-
Notifications
You must be signed in to change notification settings - Fork 323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Asynchronous get ice config #1854
Conversation
samples/Common.c
Outdated
#endif | ||
} | ||
|
||
pSampleConfiguration->iceUriCount = uriCount + 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uriCount
is a local variable, so the count would end up getting updated for sync/async case. For async case, the URI count is updated in the thread. So need to move this count value into the else block.
This was supposed to be a Draft PR, not yet ready for review. Apologies if I misclicked. |
…equired them to be supplied at object creation. Initialize relay candidates at end of iceAgentRestart.
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## develop #1854 +/- ##
===========================================
- Coverage 75.39% 75.32% -0.07%
===========================================
Files 48 48
Lines 12199 12254 +55
===========================================
+ Hits 9197 9230 +33
- Misses 3002 3024 +22 ☔ View full report in Codecov by Sentry. |
…ng state machine flow
…x candidates have been recieved
* Asynchronous get ice config * Fixing mac compile error, addressing comments, correcting spelling error * clang format * fixing test util functions to include new APIs * Unused variables for certain compile time flags breaking mac compile * fixing more compile errors for mac * Fix a dead lock, and fix a test with the API changes * iceAgentRestart does not remove the IceServers since the old design required them to be supplied at object creation. Initialize relay candidates at end of iceAgentRestart. * Update PIC build in an attempt to fix static build on Mac * Moving git tag back to develop, since develop has been updated * remove geticeconfig from standard connect state machine flow * Async test, and moving geticeserverconfig out of the standard signaling state machine flow * clang format * Incorrect state transition * fixing async test * Up the sleep time * change async func for test to handle answer and offer * change location of creating pointer pointer * Fixing tests * Fix gathering to allow reporting relay candidates even after all srflx candidates have been recieved * unit test, longer sleep on teardown of threadpool * Fixing tests * Update samples based off feedback, fix clang compile error in test * Moved iceUriCount increment, added comments to public API * fix mac compile error from unused variable for specific ifdef
* Asynchronous get ice config * Fixing mac compile error, addressing comments, correcting spelling error * clang format * fixing test util functions to include new APIs * Unused variables for certain compile time flags breaking mac compile * fixing more compile errors for mac * Fix a dead lock, and fix a test with the API changes * iceAgentRestart does not remove the IceServers since the old design required them to be supplied at object creation. Initialize relay candidates at end of iceAgentRestart. * Update PIC build in an attempt to fix static build on Mac * Moving git tag back to develop, since develop has been updated * remove geticeconfig from standard connect state machine flow * Async test, and moving geticeserverconfig out of the standard signaling state machine flow * clang format * Incorrect state transition * fixing async test * Up the sleep time * change async func for test to handle answer and offer * change location of creating pointer pointer * Fixing tests * Fix gathering to allow reporting relay candidates even after all srflx candidates have been recieved * unit test, longer sleep on teardown of threadpool * Fixing tests * Update samples based off feedback, fix clang compile error in test * Moved iceUriCount increment, added comments to public API * fix mac compile error from unused variable for specific ifdef
* Log ice candidate protocol appropriately (#1230) * Log ice candidate protocol appropriately * Add develop to travis CI * Address comments * Realign branches during transition (#1257) * create data channel sample (#1203) * create data channel sample * moved variables to Samples.h, encapsulated with ENABLE_DATA_CHANNEL directive * removed unused variables, moved variable declarations to the top of a block * create data channel sample * moved variables to Samples.h, encapsulated with ENABLE_DATA_CHANNEL directive * Cancel the thread once mediaThreadStarted flag is set to false (#1227) * Initial stale PR template (#1226) * Update stale issue template * Testing every minute * Fix stale issue PR template (#1234) No code changed. Just a template change. So merging * Add bug and question label * Switch stale PR action to daily cadence * [FIX] When protocol in DCEP header of data channel open command is not empty, there is a check preventing the data channel to be opened. Now protocol length is correctly handled to avoid check failing. (#1228) Co-authored-by: Niyati Maheshwari <niyatim23@gmail.com> Co-authored-by: Divya Sampath Kumar <disa6302@colorado.edu> Co-authored-by: ela34 <8700736+ela34@users.noreply.github.com> * set protocol value following the spec (#1259) Co-authored-by: liyufang <liyufang@xiaomi.com> * filter out invalid candidate in sdp (#1260) Co-authored-by: liyufang <liyufang@xiaomi.com> * Added targets for cmake clean (#1253) * added targets for cmake clean * added new line, updated readme * added missing new line * updated readme to include folder details * updated readme to include folder details * viewer sample: wrap datachannel callback with `ENABLE_DATA_CHANNEL` (#1261) * create data channel sample (#1203) * create data channel sample * moved variables to Samples.h, encapsulated with ENABLE_DATA_CHANNEL directive * removed unused variables, moved variable declarations to the top of a block * create data channel sample * moved variables to Samples.h, encapsulated with ENABLE_DATA_CHANNEL directive * Cancel the thread once mediaThreadStarted flag is set to false (#1227) * Initial stale PR template (#1226) * Update stale issue template * Testing every minute * Fix stale issue PR template (#1234) No code changed. Just a template change. So merging * Add bug and question label * Switch stale PR action to daily cadence * [FIX] When protocol in DCEP header of data channel open command is not empty, there is a check preventing the data channel to be opened. Now protocol length is correctly handled to avoid check failing. (#1228) * viewer sample: wrap datachannel callback with `ENABLE_DATA_CHANNEL` Signed-off-by: zhiqinli@amazon.com <zhiqinli@amazon.com> Co-authored-by: Niyati Maheshwari <niyatim23@gmail.com> Co-authored-by: Divya Sampath Kumar <disa6302@colorado.edu> Co-authored-by: ela34 <8700736+ela34@users.noreply.github.com> * libwebsockets: add patch to fix pipe fd leak issue (#1264) Signed-off-by: Alex.Li <zhiqinli@amazon.com> * Fix scripts/pare_status.py for non-status #defines (#1268) (#1274) Co-authored-by: Kevin Allen <kallen@aurora.tech> * fix a few bugs * Revert "fix a few bugs" This reverts commit 093902432fb24f42ade2857c23eca950e0b41a2f. * fix some bugs (#1277) * Fix bugs (#1279) * fix edge case try to unlock a mutex which is not locked in teh acse the sample config was NULL (#1286) * cmake: allow user to specify OPEN_SRC_INSTALL_PREFIX (#1293) Signed-off-by: Alex.Li <zhiqinli@amazon.com> * Fix inconsistent log priority (#1309) Patch reduces priority of a few info level log messages to verbose level to be consistent with other functions in file and rest of code base. * Modify protocol loggin design in develop (#1311) * typo: typo fix (#1317) Signed-off-by: Alex.Li <zhiqinli@amazon.com> * Signaling state machine rework (#1323) * replaced recursive calls to stepSignalingStateMachine with loops * removed recursive calls to stepSignalingStateMachine * replaced stepSignalingstatemachine with signalingStateMachineIterator * removed stepUntil, continueOnReady; removed status from iterator signature; set signalingclient version; added a lock in refreshIceConfiguration * changed the declaration for i from int to UINT32 * added signaling version; removed unnecessary comment * removed redeclaration; changed value in an existing macro * Fix issue with API call failures being treated as success (#1328) * return proper error, do not reset call result value * for non retriable failures, set the terminal exit status for state in… (#1320) * for non retriable failures, set the terminal exit status for state in state machine * address comments * adjust tests set retry max to 1 * Update LwsApiCalls.c trigger travis ci * Incorporating PIC state machine level retry changes into webrtc signaling state machine (#1326) * Incorporating PIC state machine level retry changes into webrtc signaling state machine * Signaling state machine rework (#1323) * replaced recursive calls to stepSignalingStateMachine with loops * removed recursive calls to stepSignalingStateMachine * replaced stepSignalingstatemachine with signalingStateMachineIterator * removed stepUntil, continueOnReady; removed status from iterator signature; set signalingclient version; added a lock in refreshIceConfiguration * changed the declaration for i from int to UINT32 * added signaling version; removed unnecessary comment * removed redeclaration; changed value in an existing macro * Fix issue with API call failures being treated as success (#1328) * return proper error, do not reset call result value * for non retriable failures, set the terminal exit status for state in… (#1320) * for non retriable failures, set the terminal exit status for state in state machine * address comments * adjust tests set retry max to 1 * Update LwsApiCalls.c trigger travis ci * Add retry strategy to client info to avoiud changing create signaling channel API signature * Incorporating PIC state machine level retry changes into webrtc signaling state machine * Add retry strategy to client info to avoiud changing create signaling channel API signature * Adding more debug logs in the code * fix merge conflicts * PR feedback Co-authored-by: Niyati Maheshwari <niyatim23@gmail.com> Co-authored-by: Hassan Sahibzada <hsahibza@amazon.com> * Revert " Incorporating PIC state machine level retry changes into webrtc signaling state machine (#1326)" (#1339) This reverts commit 06bffcecd7f60571e29e51eb15fa8e4549638213. * Incorporating PIC state machine level retry changes into webrtc signaling state machine (#1341) * Incorporating PIC state machine level retry changes into webrtc signaling state machine * Add a n optional check for free retry strategy * Remove unused goto label * add missing sleep in get token state machine execute API * update log line * Update Producer hash * Adding a high level retry strategy while creating signaling client * Add Retry count retrieval in hook (#1335) * Add Retry count retrieval in hook * Fix compile issue on travis * Pull in latest changes in retry structures * Rebasing off develop with successful travis run for retry * Log git hash (#1345) * Log git hash * Update CMakeLists.txt white space change to trigger travis Co-authored-by: Hassan Sahibzada <hsahibza@amazon.com> * Fix retry count to indicate count only after a retry has occured (#1348) Fix retry count to indicate count only after a retry has occurred * add support for automatic clock skew detection and correction (#1344) * add support for automatic clock skew detection and correction * auto fix clock skew and add tests * enable test to check clock recovery * remove stuff left over from debugging, reset logging default to WARN * remove unused variable * get rid of verbose logging in unit tests causes static build to fail due to excessive log output * simplify code get rid of extra call to length because the lws_hdr_copy returns the same value * handle null stream track in case of recvonly (#1346) * handle null stream track in case of recvonly * a test with null stream track for revconly * Fix a comment * whitespace change * State machine preparation is decoupled from the constructor (#1343) * Merge master into develop (#1352) * Missing the public API switch in the other samples (#1356) * Fix Fetch error retry cases (#1359) * Fix Fetch error retry cases * update comment * added implementation and a test to use remote sdp to construct local sdp (#1238) * added implementation and a test to use remote sdp to construct local sdp * used same strings in offer and test * updated tests * Update stale action workflow (#1381) * Modify issue triaging management * test on branch * Update ga for stale issue to use aws-actions instead of the one publicly available * Travis to ga (#1347) * Test github actions * Clang format * Change platform * Add macos gtest * Ubuntu latest * Address sanitizer * Add ubsan, tsan and old gcc build * Fix macos build * Allow mac and ubsan to fail * Fixing clang format * Testing allow on failure * Run github actions only on PR and merge * Test mbedtls * Rebase on develop and fix clang failure * Test if travis builds without ga * Restore travis * Test mac build and add sample check * Fix sample check and revert mac to allow fail * Travis CI to GHA migration phase 1 * Set clang for mbedtls and test msan * Split files * Comment out failing tests * Add codecov * Travis CI to GHA migration phase 1 * new Chrome v98 produces extra sdp attributes, up the limit so we do n… (#1391) * new Chrome v98 produces extra sdp attributes, up the limit so we do not reject * Fix test and change count to unit16 to avoid overflow issues * fix issue reported by codeql Co-authored-by: Divya Sampath Kumar <disa6302@colorado.edu> * GitHub actions setup (#1390) * add additional tests * fix syntax error * fix syntax error * fix syntax error * fix syntax error * fix syntax error * static build and msan without docker * fix msan * use dependencies with msan build * use gcc 9 for mac * use gcc 4.2 for mac gcc build * use gcc 4.9 for mac gcc build * check gcc version; use macos 10.15 * use clang-7 for ubsan * arm cross compilation * missed cloning the repository * use gcc * remove compiler from env * fix install deps * use clang7, macos10.15, ubuntu18.04 * fix windows build * fix test instruction * fix static build * fix static build * fix static build * fix static build * setup docker for static build * use alpine for the static build * use alpine for the static build * install dependencies * install dependencies * fix errors in static build * install dependencies * enable ipv6 * use gcc for static build * fix ubsan * fix ubsan * collate all working github actions builds * fix errors * have static,msan,windows,doxygen in travis * comment failing builds;fix ci rules * fix travis comments, os, remove exports * update log level, mac build-name * add CC * update gcc * update gcc * check cc and cxx for mac gcc * Revert "check cc and cxx for mac gcc" This reverts commit 2db1e0e4b7a9291a389cbae0f3793edd7f88c7ae. * remove travis statement * Fix swapped SSL_free() and SSL_CTX_free() (#1401) * Hangup value included in LWS retry strategy (#1403) * GitHub actions setup static build (#1405) * fix static build * remove static build from travis * fix warnings in mac builds; setup iam role for sample-check * Migrate Doxygen to GitHub Actions (#1416) * add doxygen workflow to ga * install graphviz * install ttf-freefont * specify doxyfile * use enc key * use enc key * use marketplace action to deploy * use marketplace action to deploy * use marketplace action to deploy * check current folder * check current folder * check current folder * check current folder * check current folder * check current folder * check current folder * fix deployment * fix deployment * fix deployment * fix deployment * specify doxyfile path * fix syntax * fix paths in doxyfile * fix forked branch ci * add develop branch * Fix ResourceEndpoint length check (#1411) ResourceEndpoint length check mistakenly uses ChannelName max length. * update cross-compilation builds ga (#1429) * Addressing error handling concerns for an edge case (#1443) * Addressing error handling concerns for an edge case * Clang format * Removed useless status_success check, changed test to look for correct error value * sample: fix possible timerQueue deadlock when freeSampleStreamingSession (#1448) Signed-off-by: zhiqinli@amazon.com <zhiqinli@amazon.com> * metrics: allow viewer sample to get ice candidate pair stats (#1406) Signed-off-by: Alex.Li <zhiqinli@amazon.com> * account for hexidecimal numbers (#1465) * Fix default data channel ordering mode (#1476) * Invoke gst_object_unref on allocated elements (#1477) * Fix typo (#1478) * Fix typo * Add unit test * find gcc version for static build * revert gtest version update and change alpine version * fix memory leak issue and abort trap in test * fix video delay 4s (#1525) * fix mips compile error (#1532) * fix mips compile error * fix mips compile error * fix mips compile error * Fix file caching (#1575) * Fix file caching * Update test to count entries, remove unnecessary memcpy * UT uses MEMFREE * Fix deadlock getIceCandidatePairStatsCallback (#1561) * sample: fix possible timerQueue deadlock when freeSampleStreamingSession * minor change (formatting) * Fix missing SDP m-line problem (#1458) * use fake transceiver for missing m-line * use hashtable to track previously seen transceivers * fix failing tests with updates to seenTransceivers hashtable * use hashtables for unknown codec rtpmap and payloadtype * fix firstCodec value in case of only a single codec in m-line * rename variables * clang build * fix mac-gcc build * add test * add test for missingAudioTransceiver * add comments * add comments * remove unused variable to fix mac buils * Fix GHA CI build issues (#1631) * separate builds and tests * fix clang format issues * update libgtest version to 1.12.1 * fix deprecation in libgtest * update test suite call * run tests from build * remove build from tst instruction * fix san options * fix windows build * fix path in windows build * update bat file for windows * build openssl on windows * add openssl path for windows build * specify path to openssl root folder * specify path to openssl root folder * specify path to openssl root folder * upgrade cmake version * fix windows build * update checkoutv2 to v3 * fix checkout and install pthreads * remove windows build temporarily * move to v1-node16 for aws credentials * add sudo clean * add sudo to both commanda * use event triggers * Fix CI for forked branches (#1634) * use only target * use only target * remove branch name * blank space change to trigger CI * fix WSAPoll failed when set POLLPRI flag (#1636) Co-authored-by: weishao <xweimvp@gmail.com> * Update README.md (#1637) Co-authored-by: Hassan Sahibzada <hsahibza@amazon.com> * add paths for fedora (#1638) Co-authored-by: Hassan Sahibzada <hsahibza@amazon.com> * Add clarifying comment for fallthrough (#1639) * Bkneff patch 2 (#1640) * Update kvsWebRTCClientMasterGstreamerSample.c Provide an example gstreamer pipeline for Raspberry Pi hardware encoding. Tested on Raspberry Pi 3 * Clang --------- Co-authored-by: bkneff <44409173+bkneff@users.noreply.github.com> * thread cancel memory leak, recreate signaling client & lws_context whenever a significant error has occurred, verbose and debug logging for ice & turn (#1641) * recreate signaling client & lws_context whenever a significant error has occurred * clang-format * recreate signaling client & lws_context whenever a significant error has occurred * Clang * adding local and remote null checks * More verbose and debug logging for ice & turn * Thread cancel on the media sender thread leads to memory leaks from writeFrame() not freeing all its heap usage * Clang again --------- Co-authored-by: James Delaplane <delaplan@amazon.com> * wrong port/address on debug log (#1642) Co-authored-by: Alex Zhukov <azhukov@roblox.com> * Update openssl version (#1643) * Update openssl version and fix unused param typo * Pull in producer C openssl update * fix(project): fix issue--1614 (#1644) Co-authored-by: niedb <niedb@reolink.com.cn> * update versions for actions (#1647) * Seggregaated Audio and Video frame handling, updated Master sample to handle audio and video both (#1646) Co-authored-by: Vikram(VS) <vssht@amazon.com> * Mark Datachannel specific code explicitly (#1666) Co-authored-by: Dmitry Ilyin <dima@doty.ru> * Fix turn allocation taken long time when credential is incorrect (#1667) * fix turn allocation use long time sometimes * update some code style * fix compile error * Update IceAgent.c * fix clang format * fix prflx update interrupted connectivity check * fix clang format --------- Co-authored-by: Gordon <vc60er@163.com> * Update RtcpPacket.h (#1680) * Update RtcpPacket.h * Clang format * Changed sample frames to have 1 second GOP size, and removed overly verbose log (#1686) * Jitter buffer overflows (#1677) * Modified jitterbuffer to include checks for timestamp overflow * All tests passing, some new tests still need to be added * More tests and accompanying fixes * Resolve coverity finding of multiplication causing type overflow * Change function order * Clang format * Mac compile errors fixed * Commenting out long-running test, adding timestamp overflow test * Fix port printf in log (#1682) * Fix port printf in log * Fix the clang-format Fix the clang-format use ./scripts/clang-format.sh -d src/ * fix turn permission delay 2s (#1675) * fix turn permission delay 2s * Fix the clang-format Fix the clang-format use ./scripts/clang-format.sh -d src/ * Instruction to build on MacOS M1 (#1689) * Fix build dependencies off and add version requirements in readme (#1691) * Unlock mutex in case of error (#1696) * Unlock in case of error * fix typos (#1697) Co-authored-by: Ben Mesander <bmesander@cardinalpeak.com> * IoT CertificateId as Stream Name. (#1721) * IoT CertificateId as Stream Name. * Fix the clang-format use ./scripts/clang-format.sh -d src/ --------- Co-authored-by: Lina Chen <chenln1124@thundersoft.com> * If local ICE is invalid, return from sending packet. (#1718) * If local ICE is invalid, return from sending packet. * Fix the clang-format use ./scripts/clang-format.sh -d src/ --------- Co-authored-by: Lina Chen <chenln1124@thundersoft.com> * Adds RTSP Source to GStreamer Sample (#1740) * Adds rtsp source support, modifies source-type determination * All use cases tested and debugged. * Clang formatting. * Clang formatting. * Updates credentials configuration to fix sample-check error. * Sample-check fix attempt #2 * Sample-check fix attempt 3 * Sample-check fix attempt 4 * Sample-check fix attempt * "" * " " * " " * " " * Update README.md * Updates sample run instructions structure, adds RTSP source instructions * Update README.md * Renames sample file to be same as executable, updates CMakeLists to reflect this. * Update README.md Co-authored-by: Niyati Maheshwari <niyatim23@gmail.com> * Update README.md * Updates usage statement to new sample executable name --------- Co-authored-by: Niyati Maheshwari <niyatim23@gmail.com> * replace stun with sctp (#1743) * Modify the PR template (#1745) * modify the PR template * Use bullets * Update raspberry pi hardware encode to current gstreamer (#1746) * Update raspberry pi hardware encode to current gstreamer * - Provide build instructions for 32-bit raspbian on 64-bit hardware --------- Co-authored-by: Ben Mesander <bmesander> * Set a default user agent if not provided (#1739) * Connection timeout sleep (#1744) * Remove thread_detach and looping sleep, add thread_join * Added support for socketpair() and added it to connectionlistener * Clang formatting * Fix test that previously expected TID to be invalid * remove unused variables * Fixing incorrect typing on comparison * clang formatting * strlen -> STRLEN macro * Off by 1 error in poll rfds * clang formatting * Fix comment typo regarding default source in Gst sample (#1750) * Parse IP address if the hostname conforms to Public ipv4 DNS format (#1759) * Parse IP address if the hostname conforms to Public ipv4 DNS format * Unit test for ipIpAddr function * Include and use threadpool for signaling channel messages (#1761) * Include and use threadpool for signaling channel messages * Fix clang and linux gcc compile errors * Fix pointer cast * Using SignalingClientInfo to pass information about Threadpool * edit README.md * Not necessary to change struct version * Update struct version again, add fall-through * clang formatting * Clang formatting, again * Fix the Windows build in the CI (#1764) * modify libwebsockets to work on Windows * set LWS_WITH_STATIC 1 * resume windows ci * add rest of the options * fix syntax in ci.yml * remove other options * set cmd vard * missing space in bat * add missing = in build_windows.bat * introduce cmake arguments * find_package openssl for non-windows builds * static + shared for rest of the builds * set static + shared true for shared builds always * add back ssl and crypto paths * rename vars in libwebsockets' cmake, rearrange, pthread fix * static=1 always * remove ssl and crypto paths * with_threadpool=1 * correction * correction 2 * correction 3 * correction 4 * correction 5 static * install gstreamer on windows * test mbedtls on windows * use if(WIN32) with set vars * 1671 * remove openssl arg from mbedtls build * fix mbedtls windows later * Introducing profiling of code sections and APIs (#1755) * Adds RTSP Source to GStreamer Sample (#1740) * Adds rtsp source support, modifies source-type determination * All use cases tested and debugged. * Clang formatting. * Clang formatting. * Updates credentials configuration to fix sample-check error. * Sample-check fix attempt #2 * Sample-check fix attempt 3 * Sample-check fix attempt 4 * Sample-check fix attempt * "" * " " * " " * " " * Update README.md * Updates sample run instructions structure, adds RTSP source instructions * Update README.md * Renames sample file to be same as executable, updates CMakeLists to reflect this. * Update README.md Co-authored-by: Niyati Maheshwari <niyatim23@gmail.com> * Update README.md * Updates usage statement to new sample executable name --------- Co-authored-by: Niyati Maheshwari <niyatim23@gmail.com> * Connection timeout sleep (#1744) * Remove thread_detach and looping sleep, add thread_join * Added support for socketpair() and added it to connectionlistener * Clang formatting * Fix test that previously expected TID to be invalid * remove unused variables * Fixing incorrect typing on comparison * clang formatting * strlen -> STRLEN macro * Off by 1 error in poll rfds * clang formatting * Fix comment typo regarding default source in Gst sample (#1750) * Initial commit * New structures to track signaling latency in diagnostics * Make peer connection stats accessible in application * Fix ice agent profling to store in variables, new APIs for getting ice agent metrics * Profile create peer connection * Macro fixes * More macro fix --------- Co-authored-by: Stefan Kieszkowski <85728496+stefankiesz@users.noreply.github.com> Co-authored-by: Niyati Maheshwari <niyatim23@gmail.com> Co-authored-by: jdelapla <delaplan@amazon.com> * Fix Windows tests (#1769) * enable verbose logs * fix syntax * without gtest filter * env path * cmd.exe /c * give permissions to file * move to C: instead of D: * don't move anything * add paths to pthread, ssl, crypto, websockets dlls * cd missing * uncomment other builds * comment msan * filter out tests * Refactor issue templates (#1770) * add support for CN region (#1612) (#1777) Signed-off-by: Alex Li <zhiqinli@amazon.com> Co-authored-by: Alex.D.Scofield <zhiqinli@amazon.com> * sample: remove unused pIotCoreThingName (#1720) Signed-off-by: Alex.Li <zhiqinli@amazon.com> * Fix refresh permission test by checking more regularly (#1779) * PR description GHA (#1781) * Run unit tests which require creds (#1780) * Run unit tests which require creds * TSAN supp to get past this and check if other tests pass * Reenable tsan failure * Isolate tsan * Enable all tests * Add locks around connectionClosed modification * Update SignalingApiFunctionalityTest.cpp * Have a different signaling send timeout for windows and non-windows platform * Change timer for timeout test to be unrealistic to actually force a timeout * Enable tests with codecov * Update SignalingApiFunctionalityTest.cpp fix broken test. future commit will include code change so arn doesn't take the place of the channel name so the channel end point cache numbers will also be low * Update SignalingApiTest.cpp if using temp creds need to use the temp creds file format --------- Co-authored-by: Hassan Sahibzada <hsahibza@amazon.com> Co-authored-by: James Delaplane <delaplan@amazon.com> * Release branch update and readme update (#1785) * DTLS socket no longer pre-preemptively closed (#1792) * Fix issue with aggressive nomination viewers causing master to potentially close the socket negotiating DTLS connection. Added two tests to confirm this behavior can no longer occur for aggressive nomination or standard ICE/nomination. Changed the ICE statemachine Ready and Connected setups. Connected will only set DataSending pair in an aggressive nomination case, and Ready will no longer change the DataSending pair if it has already been assigned (because if it has, DTLS handshaked could be actively happening on that socket). This means that in the current ICE state machine design DTLS negotiation will only occur after nomination, where before it would start earlier and the client would assume which pair the viewer would nominate. * clang formatting * Reset test values in each run * update transactionId for SrflxCandidateRequest (#1684) * update transactionId for SrflxCandidateRequest * Fix the clang-format * Fix wrong log headers * Change usrsctp initialization function to not open raw sockets (#1796) * Create a CMake flag to enable KVS Threadpool (#1806) * create a cmake flag to enable kvs threadpool and pass it to the SDK * create a cmake flag to enable kvs threadpool and pass it to the SDK * missed one spot * add debug logs to fix tests * fix tests attempt 1 - initialize min and max for the threadpool * silly syntax error * setting min value for threadpool in test fixture * fix clang format * fixing client info initializations in other tests * More initializations for tests * Add sleep at end of tests to avoid false flags of memory leaks as threads end asynchronously * add tsan supp * tsan sup -2 * missing # in details in supp * more sleeps to allow threadpool to close out all threads * add suppressions to threadpool * add suppressions to threadpool push * race:pthread_mutex_unlock * add test name instead of threadpool function names * rename the cmake var to control only signaling threadpool * try without . in the test name * use mutex instead of race * remove mutex:lock * add back mutex:lock * deadlock:iceServerConfigRefreshConnectedAuthExpiration * deadlock:createSignalingSync * Update producer dependency to include modified threadpool teardown * Remove previous suppressions * cleanup + rename * update git tag --------- Co-authored-by: James Delaplane <delaplan@amazon.com> * Threadpool context for WebRTC (#1810) * Threadpool context for WebRTC * Disable for windows * Include directory to shared library for windows * Remove context object, use envs to allow configuring threadpool * Include README changes * Get back threadpool context This reverts commit 23070567312595da555d1688cf21c335105543f7. * Move thread sleep to unit tests * Revert sleep from test to main file * Remove threadpool usage from signaling * Rebased off develop * Add locks around threadpool calls * Add a=ice-options:trickle to session level of SDP as viewer (#1813) * Add a=ice-options:trickle to session level of SDP as viewer * negative test case added * clang format * add chk_log_err to confirm what is null in the stack * WebRTC Client singleton and early STUN DNS resolution (#1812) * STUN DNS resolution and webrtc client singleton * Add initializer flag for the main context * Move lock out of Stun context * Add semaphore for the singleton access * Lock on the sempahore before freeing to ensure clean shutdown * Cleanup sem acquired bool flag * Use atomic refcounter * Clang format issues * Have initialized check in thread * Move context initialize setting to top of cleanup * Remove '$' from ReadMe command * Fix mbedtls build failure for 22.04 (#1823) * Fix mbedtls build failure for 22.04 * Fix CI gcc 11 mbedtls * Dont install gcc4.4 * Use the c flags in mbedtls object * Move string op error elsewhere * Fixed an issue where sctpSessionWriteMessage referenced an uninitialized value (#1814) * Allow using channel names different than the thing name (#1819) * Allow using channel names different than the thing name * Reverted the changes related to channel name in the README * Defaulting channel name to iot thing name * IAM best practices added for IoT --------- Co-authored-by: Ozan Cihangir <ozanci@amazon.lu> * Dtls handshake process optimization (#1824) * DTLS initialization optimization * Fix mbedtls build, remove free ICE agent * Fix breaking change of overwriting sctp packet * API unit tests, move acquire to before null check * Unused variable issue in UT * Change ice server count value (#1826) * CI modification (#1827) * CI modification * Fix label * Add more clarity * Handle situation where callback is invoked before hostname is populated (#1829) * Revert CI for fork (#1831) * Dtls err handling (#1832) * Improve DTLS error handling * Add check for SSL_do_handshake too * Ice turn sleepless state machine (#1825) * Starting point for turn state machine * Add timerqueue kick and checks for ice agent state machine * Completing turn connection state machine * improved error logging * Better error logging around ICE_STATE_FAILED * Adding lock around step state machine to prevent race conditions with iceAgentStatus * Only lock the iterator during stepstate * Add turn state transition after handling stun packets for turn * add null check to iceagentrestart * Use producer-c develop * Fix data race * Cleanup commented out code * remove excessive buffer check in dtls_openssl * Profile STUN DNS resolution time (#1828) * Fix regression in stun dns resolve value (#1836) * DLOGS readme update (#1838) * add deps (#1837) * Fix frame indexing in master sample to handle SRTP connection not ready yet (#1833) * Add fix to kvsWebRTCClientMaster.c * Change printf-s to DLOG-s * Add log for frame drop due to srtp not ready yet * Add missing sample prefix to log lines * Semicolon * CLANG * Remove \n from logs * " " * CLANG * Move lock out of checkStateMachine and instead have it present in from* functions (#1839) * Update SessionDescription.c (#1842) * Update SessionDescription.c Adds trickle ice option to application m-line (data channel). * Update SessionDescription.c respect the boolean value for trickle ice so it's consistent across all media level and session level * clang format * M1 build (#1849) * m1 build * try m clang instead of gcc * remove ldflags and cpath * add back * unlink openssl in m1 * -Wno-nullability-extension * -Wno-nullability-extension in compile options * -Wno-nullability-extension in compile options * try cmake twice * add wno to libsrtp in cmake_c_flags * llvm * llvm@15 * llvm@15 removed tests * run cmake only once on m1 * run cmake twice with tests * check the contents of build * don't run the tests * remove wno * gcc * Update Readme to include Windows build instructions (#1858) * update windows readme * update windows readme * typo * Sample: Ignore empty session token (#1857) * Allow empty session token to be set without interfering * Use getenv macro * Set session token to empty string in test * missing null check (#1874) * Asynchronous get ice config (#1854) * Asynchronous get ice config * Fixing mac compile error, addressing comments, correcting spelling error * clang format * fixing test util functions to include new APIs * Unused variables for certain compile time flags breaking mac compile * fixing more compile errors for mac * Fix a dead lock, and fix a test with the API changes * iceAgentRestart does not remove the IceServers since the old design required them to be supplied at object creation. Initialize relay candidates at end of iceAgentRestart. * Update PIC build in an attempt to fix static build on Mac * Moving git tag back to develop, since develop has been updated * remove geticeconfig from standard connect state machine flow * Async test, and moving geticeserverconfig out of the standard signaling state machine flow * clang format * Incorrect state transition * fixing async test * Up the sleep time * change async func for test to handle answer and offer * change location of creating pointer pointer * Fixing tests * Fix gathering to allow reporting relay candidates even after all srflx candidates have been recieved * unit test, longer sleep on teardown of threadpool * Fixing tests * Update samples based off feedback, fix clang compile error in test * Moved iceUriCount increment, added comments to public API * fix mac compile error from unused variable for specific ifdef * Merge release into develop (#1865) * No more detaching threads in tests (#1889) * No more detaching threads in tests * Missed joining in one test * lock around adding thread to vector * terminate adding threads flag * reset bool in tests * Change on Ice handler after done with test to stop accessing out of scope variables after scope is closed * unused params * Time-to-first-frame metrics benchmarking using datachannel (#1846) * data channel benchmarking message * fix calculation * send peerconnection, iceagent, signaling metrics to viewer via dc * signaling breakdown * data channel benchmarking message * fix calculation * send peerconnection, iceagent, signaling metrics to viewer via dc * signaling breakdown * cmake flag, ifdef * move signaling and offer / answer metrics out of signaling stats * remove callTime for start and end times in signaling * remove new lines * clang format * fix clang format * fix macos-gcc-ci * put cleanup in ifdef * add cmake flag * additional builds with cmake flags for mac and ubuntu, max string size for dc, no strlen calc in max string sizes * fix clang-format * mac-os-dc-metrics-build-gcc * increase signaling metrics message size * address comments: bool, add back calltimes, remove hns * missed an hns * dlogp * fix the build * remove extra space from ci * cleanup-1 * clang-format * fix git_tag from master to fix the ci * Revert "fix git_tag from master to fix the ci" This reverts commit 870deb3ddaf7c3676bebd267b0d61a76ad562751. * move message defs to common * remove unused var * remove unused var * cleanup-3 * cleanup-4 * fix macos build * Revert "fix macos build" This reverts commit 041c858ce47adb1a812b24da86d7ac91b824fd8c. * use double quotes instead of single for char array * forgot to rename in the string * fix initialization + readme * remove offerTime and use offerReceivedTime instead * move globals to streamingsession * rename + memset * fix clang format * add null check for streaming session * null check for streaming session and psampleconfigurtion * add error messages * clang * error message * ubuntu sample check update * fix sample check * Update lws version (#1820) * Update lws version * Remove patch * Use old gcc patch * Old gcc patch update * Fix windows patching failure * Add verbose logging for patch failure * Remove newline in the patch file * Trying a windows friendly patch file * Move to another patch file * Revert "Move to another patch file" This reverts commit d94a3da44226e10164f03d99a26e7eb699459055. * Revert "Trying a windows friendly patch file" This reverts commit a6c7de25bfbf756301b17db888ede803fbfd0a8a. * Revert "Remove newline in the patch file" This reverts commit 9e5d47e463271626684b0e0a335d0e2bc00d6e0c. * Windows patch fix * Update to 4.3.3 * Reintro gcc patch for lws_map * Rebase develop * DTLS API test * Revert "DTLS API test" This reverts commit 83f104b2bc53305d35fc7ca3e8bfa9a08ebcc924. * WINDOW_UPDATE failure on mbedtls, enable an option * Revert to 4.3.2 to check if mbedtls passes there * Disable alpn * codingspirit PR #1869 (#1872) * fix compiling issue caused by "stringop-overflow" in old gcc * Add quotes around version number * Add mbedtls-ubuntu-gcc-4_4-build to CI * Separate flag setting * Add else clause for detected compiler Co-authored-by: zhiqinli * Create state machines with names (#1894) * Create state machines with names * Add turn object in logs * Add links and enhance formatting (#1895) * Add links and enhance formatting * Update README.md Co-authored-by: Stefan Kieszkowski <85728496+stefankiesz@users.noreply.github.com> --------- Co-authored-by: Stefan Kieszkowski <85728496+stefankiesz@users.noreply.github.com> * Turn improvements and profiling (#1896) * Use timeout value instead of counter for allocation * Add timeout for get credentials too and change all timeouts to a standard 5 seconds * Added internal profiling and SM labels * Add IPv4 check while adding peer * Nit * debug string cleanup * Profile create perm and bind channel only first time and profile per peer * Add README * Fix compiler ubused variable warnings * Fix the problem that the session is not released when handleOffer processing fails (#1668) * Update Common.c Fix the problem that the session is not released when handleOffer processing fails * fix clang format * add cleanup * missed the & * remove pSampleStreamingSession->offerReceiveTime = GETTIME(); * move the bool --------- Co-authored-by: Kelephant <keviniot@163.com> * Update issue template (#1898) * Request more information on the issue template * Update yaml indenting * Update bug_report.yml * Update bug_report.yml * Update bug_report.yml * Update bug_report.yml * Update bug_report.yml * Add information on sanitizers in CI * Adjust linebreaks * Fix packetsDiscarded tracking operation (#1903) * CMAKE_BUILD_TYPE=Release build (#1897) * Release build * Enable build type setting on all dependencies and update README * Remove SPRINTF usage throughout... * Fix disable data channel unit test build failure and reduce SDP character array lengths wherever relevant following spec * Set count to 7 since the structure member sizes are set to count + 1 * remove debug * Add snprintf checks * Set file size to 10 kb and increase log rotation to avoid high memalloc * Remove unused threadpool in signaling (#1907) * New release cut * testing release with media storage support (#1783) * Log ice candidate protocol appropriately (#1230) * Log ice candidate protocol appropriately * Add develop to travis CI * Address comments * Realign branches during transition (#1257) * create data channel sample (#1203) * create data channel sample * moved variables to Samples.h, encapsulated with ENABLE_DATA_CHANNEL directive * removed unused variables, moved variable declarations to the top of a block * create data channel sample * moved variables to Samples.h, encapsulated with ENABLE_DATA_CHANNEL directive * Cancel the thread once mediaThreadStarted flag is set to false (#1227) * Initial stale PR template (#1226) * Update stale issue template * Testing every minute * Fix stale issue PR template (#1234) No code changed. Just a template change. So merging * Add bug and question label * Switch stale PR action to daily cadence * [FIX] When protocol in DCEP header of data channel open command is not empty, there is a check preventing the data channel to be opened. Now protocol length is correctly handled to avoid check failing. (#1228) Co-authored-by: Niyati Maheshwari <niyatim23@gmail.com> Co-authored-by: Divya Sampath Kumar <disa6302@colorado.edu> Co-authored-by: ela34 <8700736+ela34@users.noreply.github.com> * set protocol value following the spec (#1259) Co-authored-by: liyufang <liyufang@xiaomi.com> * filter out invalid candidate in sdp (#1260) Co-authored-by: liyufang <liyufang@xiaomi.com> * Added targets for cmake clean (#1253) * added targets for cmake clean * added new line, updated readme * added missing new line * updated readme to include folder details * updated readme to include folder details * viewer sample: wrap datachannel callback with `ENABLE_DATA_CHANNEL` (#1261) * create data channel sample (#1203) * create data channel sample * moved variables to Samples.h, encapsulated with ENABLE_DATA_CHANNEL directive * removed unused variables, moved variable declarations to the top of a block * create data channel sample * moved variables to Samples.h, encapsulated with ENABLE_DATA_CHANNEL directive * Cancel the thread once mediaThreadStarted flag is set to false (#1227) * Initial stale PR template (#1226) * Update stale issue template * Testing every minute * Fix stale issue PR template (#1234) No code changed. Just a template change. So merging * Add bug and question label * Switch stale PR action to daily cadence * [FIX] When protocol in DCEP header of data channel open command is not empty, there is a check preventing the data channel to be opened. Now protocol length is correctly handled to avoid check failing. (#1228) * viewer sample: wrap datachannel callback with `ENABLE_DATA_CHANNEL` Signed-off-by: zhiqinli@amazon.com <zhiqinli@amazon.com> Co-authored-by: Niyati Maheshwari <niyatim23@gmail.com> Co-authored-by: Divya Sampath Kumar <disa6302@colorado.edu> Co-authored-by: ela34 <8700736+ela34@users.noreply.github.com> * libwebsockets: add patch to fix pipe fd leak issue (#1264) Signed-off-by: Alex.Li <zhiqinli@amazon.com> * Fix scripts/pare_status.py for non-status #defines (#1268) (#1274) Co-authored-by: Kevin Allen <kallen@aurora.tech> * fix a few bugs * Revert "fix a few bugs" This reverts commit 093902432fb24f42ade2857c23eca950e0b41a2f. * fix some bugs (#1277) * Fix bugs (#1279) * fix edge case try to unlock a mutex which is not locked in teh acse the sample config was NULL (#1286) * cmake: allow user to specify OPEN_SRC_INSTALL_PREFIX (#1293) Signed-off-by: Alex.Li <zhiqinli@amazon.com> * Fix inconsistent log priority (#1309) Patch reduces priority of a few info level log messages to verbose level to be consistent with other functions in file and rest of code base. * Modify protocol loggin design in develop (#1311) * typo: typo fix (#1317) Signed-off-by: Alex.Li <zhiqinli@amazon.com> * Signaling state machine rework (#1323) * replaced recursive calls to stepSignalingStateMachine with loops * removed recursive calls to stepSignalingStateMachine * replaced stepSignalingstatemachine with signalingStateMachineIterator * removed stepUntil, continueOnReady; removed status from iterator signature; set signalingclient version; added a lock in refreshIceConfiguration * changed the declaration for i from int to UINT32 * added signaling version; removed unnecessary comment * removed redeclaration; changed value in an existing macro * Fix issue with API call failures being treated as success (#1328) * return proper error, do not reset call result value * for non retriable failures, set the terminal exit status for state in… (#1320) * for non retriable failures, set the terminal exit status for state in state machine * address comments * adjust tests set retry max to 1 * Update LwsApiCalls.c trigger travis ci * Incorporating PIC state machine level retry changes into webrtc signaling state machine (#1326) * Incorporating PIC state machine level retry changes into webrtc signaling state machine * Signaling state machine rework (#1323) * replaced recursive calls to stepSignalingStateMachine with loops * removed recursive calls to stepSignalingStateMachine * replaced stepSignalingstatemachine with signalingStateMachineIterator * removed stepUntil, continueOnReady; removed status from iterator signature; set signalingclient version; added a lock in refreshIceConfiguration * changed the declaration for i from int to UINT32 * added signaling version; removed unnecessary comment * removed redeclaration; changed value in an existing macro * Fix issue with API call failures being treated as success (#1328) * return proper error, do not reset call result value * for non retriable failures, set the terminal exit status for state in… (#1320) * for non retriable failures, set the terminal exit status for state in state machine * address comments * adjust tests set retry max to 1 * Update LwsApiCalls.c trigger travis ci * Add retry strategy to client info to avoiud changing create signaling channel API signature * Incorporating PIC state machine level retry changes into webrtc signaling state machine * Add retry strategy to client info to avoiud changing create signaling channel API signature * Adding more debug logs in the code * fix merge conflicts * PR feedback Co-authored-by: Niyati Maheshwari <niyatim23@gmail.com> Co-authored-by: Hassan Sahibzada <hsahibza@amazon.com> * Revert " Incorporating PIC state machine level retry changes into webrtc signaling state machine (#1326)" (#1339) This reverts commit 06bffcecd7f60571e29e51eb15fa8e4549638213. * Incorporating PIC state machine level retry changes into webrtc signaling state machine (#1341) * Incorporating PIC state machine level retry changes into webrtc signaling state machine * Add a n optional check for free retry strategy * Remove unused goto label * add missing sleep in get token state machine execute API * update log line * Update Producer hash * Adding a high level retry strategy while creating signaling client * Add Retry count retrieval in hook (#1335) * Add Retry count retrieval in hook * Fix compile issue on travis * Pull in latest changes in retry structures * Rebasing off develop with successful travis run for retry * Log git hash (#1345) * Log git hash * Update CMakeLists.txt white space change to trigger travis Co-authored-by: Hassan Sahibzada <hsahibza@amazon.com> * Fix retry count to indicate count only after a retry has occured (#1348) Fix retry count to indicate count only after a retry has occurred * add support for automatic clock skew detection and correction (#1344) * add support for automatic clock skew detection and correction * auto fix clock skew and add tests * enable test to check clock recovery * remove stuff left over from debugging, reset logging default to WARN * remove unused variable * get rid of verbose logging in unit tests causes static build to fail due to excessive log output * simplify code get rid of extra call to length because the lws_hdr_copy returns the same value * handle null stream track in case of recvonly (#1346) * handle null stream track in case of recvonly * a test with null stream track for revconly * Fix a comment * whitespace change * State machine preparation is decoupled from the constructor (#1343) * Merge master into develop (#1352) * Missing the public API switch in the other samples (#1356) * Fix Fetch error retry cases (#1359) * Fix Fetch error retry cases * update comment * added implementation and a test to use remote sdp to construct local sdp (#1238) * added implementation and a test to use remote sdp to construct local sdp * used same strings in offer and test * updated tests * Update stale action workflow (#1381) * Modify issue triaging management * test on branch * Update ga for stale issue to use aws-actions instead of the one publicly available * Travis to ga (#1347) * Test github actions * Clang format * Change platform * Add macos gtest * Ubuntu latest * Address sanitizer * Add ubsan, tsan and old gcc build * Fix macos build * Allow mac and ubsan to fail * Fixing clang format * Testing allow on failure * Run github actions only on PR and merge * Test mbedtls * Rebase on develop and fix clang failure * Test if travis builds without ga * Restore travis * Test mac build and add sample check * Fix sample check and revert mac to allow fail * Travis CI to GHA migration phase 1 * Set clang for mbedtls and test msan * Split files * Comment out failing tests * Add codecov * Travis CI to GHA migration phase 1 * new Chrome v98 produces extra sdp attributes, up the limit so we do n… (#1391) * new Chrome v98 produces extra sdp attributes, up the limit so we do not reject * Fix test and change count to unit16 to avoid overflow issues * fix issue reported by codeql Co-authored-by: Divya Sampath Kumar <disa6302@colorado.edu> * GitHub actions setup (#1390) * add additional tests * fix syntax error * fix syntax error * fix syntax error * fix syntax error * fix syntax error * static build and msan without docker * fix msan * use dependencies with msan build * use gcc 9 for mac * use gcc 4.2 for mac gcc build * use gcc 4.9 for mac gcc build * check gcc version; use macos 10.15 * use clang-7 for ubsan * arm cross compilation * missed cloning the repository * use gcc * remove compiler from env * fix install deps * use clang7, macos10.15, ubuntu18.04 * fix windows build * fix test instruction * fix static build * fix static build * fix static build * fix static build * setup docker for static build * use alpine for the static build * use alpine for the static build * install dependencies * install dependencies * fix errors in static build * install dependencies * enable ipv6 * use gcc for static build * fix ubsan * fix ubsan * collate all working github actions builds * fix errors * have static,msan,windows,doxygen in travis * comment failing builds;fix ci rules * fix travis comments, os, remove exports * update log level, mac build-name * add CC * update gcc * update gcc * check cc and cxx for mac gcc * Revert "check cc and cxx for mac gcc" This reverts commit 2db1e0e4b7a9291a389cbae0f3793edd7f88c7ae. * remove travis statement * Fix swapped SSL_free() and SSL_CTX_free() (#1401) * Hangup value included in LWS retry strategy (#1403) * GitHub actions setup static build (#1405) * fix static build * remove static build from travis * fix warnings in mac builds; setup iam role for sample-check * Migrate Doxygen to GitHub Actions (#1416) * add doxygen workflow to ga * install graphviz * install ttf-freefont * specify doxyfile * use enc key * use enc key * use marketplace action to deploy * use marketplace action to deploy * use marketplace action to deploy * check current folder * check current folder * check current folder * check current folder * check current folder * check current folder * check current folder * fix deployment * fix deployment * fix deployment * fix deployment * specify doxyfile path * fix syntax * fix paths in doxyfile * fix forked branch ci * add develop branch * Fix ResourceEndpoint length check (#1411) ResourceEndpoint length check mistakenly uses ChannelName max length. * update cross-compilation builds ga (#1429) * Addressing error handling concerns for an edge case (#1443) * Addressing error handling concerns for an edge case * Clang format * Removed useless status_success check, changed test to look for correct error value * sample: fix possible timerQueue deadlock when freeSampleStreamingSession (#1448) Signed-off-by: zhiqinli@amazon.com <zhiqinli@amazon.com> * metrics: allow viewer sample to get ice candidate pair stats (#1406) Signed-off-by: Alex.Li <zhiqinli@amazon.com> * account for hexidecimal numbers (#1465) * Fix default data channel ordering mode (#1476) * Invoke gst_object_unref on allocated elements (#1477) * Fix typo (#1478) * Fix typo * Add unit test * find gcc version for static build * revert gtest version update and change alpine version * fix memory leak issue and abort trap in test * fix video delay 4s (#1525) * fix mips compile error (#1532) * fix mips compile error * fix mips compile error * fix mips compile error * Fix file caching (#1575) * Fix file caching * Update test to count entries, remove unnecessary memcpy * UT uses MEMFREE * Fix deadlock getIceCandidatePairStatsCallback (#1561) * sample: fix possible timerQueue deadlock when freeSampleStreamingSession * minor change (formatting) * wrtc stream ingestion support * clean up * default to disable data channel for wrtc ingestion * Fix missing SDP m-line problem (#1458) * use fake transceiver for missing m-line * use hashtable to track previously seen transceivers * fix failing tests with updates to seenTransceivers hashtable * use hashtables for unknown codec rtpmap and payloadtype * fix firstCodec value in case of only a single codec in m-line * rename variables * clang build * fix mac-gcc build * add test * add test for missingAudioTransceiver * add comments * add comments * remove unused variable to fix mac buils * wrtc stream ingestion support (#1605) * update readme (#1608) * update readme * update description * remove gst based storage sample (#1619) * Fix GHA CI build issues (#1631) * separate builds and tests * fix clang format issues * update libgtest version to 1.12.1 * fix deprecation in libgtest * update test suite call * run tests from build * remove build from tst instruction * fix san options * fix windows build * fix path in windows build * update bat file for windows * build openssl on windows * add openssl path for windows build * specify path to openssl root folder * specify path to openssl root folder * specify path to openssl root folder * upgrade cmake version * fix windows build * update checkoutv2 to v3 * fix checkout and install pthreads * remove windows build temporarily * move to v1-node16 for aws credentials * add sudo clean * add sudo to both commanda * use event triggers * Fix ice candidate issue with GStreamer sample (#1629) * fix gst sample * add branch to ci * fix clang * fix os versions in ci * remove unused vars to fix mac-clang build * remove unused vars to fix mac-gcc build * separate builds and tests * separate builds and tests * change test instruction for ci * change test instruction for ci * fix failing builds * add branch * Fix CI for forked branches (#1634) * use only target * use only target * remove branch name * blank space change to trigger CI * fix WSAPoll failed when set POLLPRI flag (#1636) Co-authored-by: weishao <xweimvp@gmail.com> * Update README.md (#1637) Co-authored-by: Hassan Sahibzada <hsahibza@amazon.com> * add paths for fedora (#1638) Co-authored-by: Hassan Sahibzada <hsahibza@amazon.com> * Add clarifying comment for fallthrough (#1639) * Bkneff patch 2 (#1640) * Update kvsWebRTCClientMasterGstreamerSample.c Provide an example gstreamer pipeline for Raspberry Pi hardware encoding. Tested on Raspberry Pi 3 * Clang --------- Co-authored-by: bkneff <44409173+bkneff@users.noreply.github.com> * thread cancel memory leak, recreate signaling client & lws_context whenever a significant error has occurred, verbose and debug logging for ice & turn (#1641) * recreate signaling client & lws_context whenever a significant error has occurred * clang-format * recreate signaling client & lws_context whenever a significant error has occurred * Clang * adding local and remote null checks * More verbose and debug logging for ice & turn * Thread cancel on the media sender thread leads to memory leaks from writeFrame() not freeing all its heap usage * Clang again --------- Co-authored-by: James Delaplane <delaplan@amazon.com> * wrong port/address on debug log (#1642) Co-authored-by: Alex Zhukov <azhukov@roblox.com> * Update openssl version (#1643) * Update openssl version and fix unused param typo * Pull in producer C openssl update * fix(project): fix issue--1614 (#1644) Co-authored-by: niedb <niedb@reolink.com.cn> * update versions for actions (#1647) * Seggregaated Audio and Video frame handling, updated Master sample to handle audio and video both (#1646) Co-authored-by: Vikram(VS) <vssht@amazon.com> * Mark Datachannel specific code explicitly (#1666) Co-authored-by: Dmitry Ilyin <dima@doty.ru> * Fix turn allocation taken long time when credential is incorrect (#1667) * fix turn allocation use long time sometimes * update some code style * fix compile error * Update IceAgent.c * fix clang format * fix prflx update interrupted connectivity check * fix clang format --------- Co-authored-by: Gordon <vc60er@163.com> * Update RtcpPacket.h (#1680) * Update RtcpPacket.h * Clang format * Changed sample frames to have 1 second GOP size, and removed overly verbose log (#1686) * Jitter buffer overflows (#1677) * Modified jitterbuffer to include checks for timestamp overflow * All tests passing, some new tests still need to be added * More tests and accompanying fixes * Resolve coverity finding of multiplication causing type overflow * Change function order * Clang format * Mac compile errors fixed * Commenting out long-running test, adding timestamp overflow test * Fix port printf in log (#1682) * Fix port printf in log * Fix the clang-format Fix the clang-format use ./scripts/clang-format.sh -d src/ * fix turn permission delay 2s (#1675) * fix turn permission delay 2s * Fix the clang-format Fix the clang-format use ./scripts/clang-format.sh -d src/ * Instruction to build on MacOS M1 (#1689) * Fix build dependencies off and add version requirements in readme (#1691) * Unlock mutex in case of error (#1696) * Unlock in case of error * fix typos (#1697) Co-authored-by: Ben Mesander <bmesander@cardinalpeak.com> * IoT CertificateId as Stream Name. (#1721) * IoT CertificateId as Stream Name. * Fix the clang-format use ./scripts/clang-format.sh -d src/ --------- Co-authored-by: Lina Chen <chenln1124@thundersoft.com> * If local ICE is invalid, return from sending packet. (#1718) * If local ICE is invalid, return from sending packet. * Fix the clang-format use ./scripts/clang-format.sh -d src/ --------- Co-authored-by: Lina Chen <chenln1124@thundersoft.com> * Adds RTSP Source to GStreamer Sample (#1740) * Adds rtsp source support, modifies source-type determination * All use cases tested and debugged. * Clang formatting. * Clang formatting. * Updates credentials configuration to fix sample-check error. * Sample-check fix attempt #2 * Sample-check fix attempt 3 * Sample-check fix attempt 4 * Sample-check fix attempt * "" * " " * " " * " " * Update README.md * Updates sample run instructions structure, adds RTSP source instructions * Update README.md * Renames sample file to be same as executable, updates CMakeLists to reflect this. * Update README.md Co-authored-by: Niyati Maheshwari <niyatim23@gmail.com> * Update README.md * Updates usage statement to new sample executable name --------- Co-authored-by: Niyati Maheshwari <niyatim23@gmail.com> * replace stun with sctp (#1743) * Modify the PR template (#1745) * modify the PR template * Use bullets * Update raspberry pi hardware encode to current gstreamer (#1746) * Update raspberry pi hardware encode to current gstreamer * - Provide build instructions for 32-bit raspbian on 64-bit hardware --------- Co-authored-by: Ben Mesander <bmesander> * Set a default user agent if not provided (#1739) * Connection timeout sleep (#1744) * Remove thread_detach and looping sleep, add thread_join * Added support for socketpair() and added it to connectionlistener * Clang formatting * Fix test that previously expected TID to be invalid * remove unused variables * Fixing incorrect typing on comparison * clang formatting * strlen -> STRLEN macro * Off by 1 error in poll rfds * clang formatting * Do Not Send SCTP Packets when Data Channel is Disabled (#1749) * no sctp packets when data channel is disabled * fix clang format * Fix comment typo regarding default source in Gst sample (#1750) * Parse IP address if the hostname conforms to Public ipv4 DNS format (#1759) * Parse IP address if the hostname conforms to Public ipv4 DNS format * Unit test for ipIpAddr function * Include and use threadpool for signaling channel messages (#1761) * Include and use threadpool for signaling channel messages * Fix clang and linux gcc compile errors * Fix pointer cast * Using SignalingClientInfo to pass information about Threadpool * edit README.md * Not necessary to change struct version * Update struct version again, add fall-through * clang formatting * Clang formatting, again * Fix the Windows build in the CI (#1764) * modify libwebsockets to work on Windows * set LWS_WITH_STATIC 1 * resume windows ci * add rest of the options * fix syntax in ci.yml * remove other options * set cmd vard * missing space in bat * add missing = in build_windows.bat * introduce cmake arguments * find_package openssl for non-windows builds * static + shared for rest of the builds * set static + shared true for shared builds always * add back ssl and crypto paths * rename vars in libwebsockets' cmake, rearrange, pthread fix * static=1 always * remove ssl and crypto paths * with_threadpool=1 * correction * correction 2 * correction 3 * correction 4 * correction 5 static * install gstreamer on windows * test mbedtls on windows * use if(WIN32) with set vars * 1671 * remove openssl arg from mbedtls build * fix mbedtls windows later * Introducing profiling of code sections and APIs (#1755) * Adds RTSP Source to GStreamer Sample (#1740) * Adds rtsp source support, modifies source-type determination * All use cases tested and debugged. * Clang formatting. * C…
* Release 1.10.0 (#1910) * Log ice candidate protocol appropriately (#1230) * Log ice candidate protocol appropriately * Add develop to travis CI * Address comments * Realign branches during transition (#1257) * create data channel sample (#1203) * create data channel sample * moved variables to Samples.h, encapsulated with ENABLE_DATA_CHANNEL directive * removed unused variables, moved variable declarations to the top of a block * create data channel sample * moved variables to Samples.h, encapsulated with ENABLE_DATA_CHANNEL directive * Cancel the thread once mediaThreadStarted flag is set to false (#1227) * Initial stale PR template (#1226) * Update stale issue template * Testing every minute * Fix stale issue PR template (#1234) No code changed. Just a template change. So merging * Add bug and question label * Switch stale PR action to daily cadence * [FIX] When protocol in DCEP header of data channel open command is not empty, there is a check preventing the data channel to be opened. Now protocol length is correctly handled to avoid check failing. (#1228) Co-authored-by: Niyati Maheshwari <niyatim23@gmail.com> Co-authored-by: Divya Sampath Kumar <disa6302@colorado.edu> Co-authored-by: ela34 <8700736+ela34@users.noreply.github.com> * set protocol value following the spec (#1259) Co-authored-by: liyufang <liyufang@xiaomi.com> * filter out invalid candidate in sdp (#1260) Co-authored-by: liyufang <liyufang@xiaomi.com> * Added targets for cmake clean (#1253) * added targets for cmake clean * added new line, updated readme * added missing new line * updated readme to include folder details * updated readme to include folder details * viewer sample: wrap datachannel callback with `ENABLE_DATA_CHANNEL` (#1261) * create data channel sample (#1203) * create data channel sample * moved variables to Samples.h, encapsulated with ENABLE_DATA_CHANNEL directive * removed unused variables, moved variable declarations to the top of a block * create data channel sample * moved variables to Samples.h, encapsulated with ENABLE_DATA_CHANNEL directive * Cancel the thread once mediaThreadStarted flag is set to false (#1227) * Initial stale PR template (#1226) * Update stale issue template * Testing every minute * Fix stale issue PR template (#1234) No code changed. Just a template change. So merging * Add bug and question label * Switch stale PR action to daily cadence * [FIX] When protocol in DCEP header of data channel open command is not empty, there is a check preventing the data channel to be opened. Now protocol length is correctly handled to avoid check failing. (#1228) * viewer sample: wrap datachannel callback with `ENABLE_DATA_CHANNEL` Signed-off-by: zhiqinli@amazon.com <zhiqinli@amazon.com> Co-authored-by: Niyati Maheshwari <niyatim23@gmail.com> Co-authored-by: Divya Sampath Kumar <disa6302@colorado.edu> Co-authored-by: ela34 <8700736+ela34@users.noreply.github.com> * libwebsockets: add patch to fix pipe fd leak issue (#1264) Signed-off-by: Alex.Li <zhiqinli@amazon.com> * Fix scripts/pare_status.py for non-status #defines (#1268) (#1274) Co-authored-by: Kevin Allen <kallen@aurora.tech> * fix a few bugs * Revert "fix a few bugs" This reverts commit 093902432fb24f42ade2857c23eca950e0b41a2f. * fix some bugs (#1277) * Fix bugs (#1279) * fix edge case try to unlock a mutex which is not locked in teh acse the sample config was NULL (#1286) * cmake: allow user to specify OPEN_SRC_INSTALL_PREFIX (#1293) Signed-off-by: Alex.Li <zhiqinli@amazon.com> * Fix inconsistent log priority (#1309) Patch reduces priority of a few info level log messages to verbose level to be consistent with other functions in file and rest of code base. * Modify protocol loggin design in develop (#1311) * typo: typo fix (#1317) Signed-off-by: Alex.Li <zhiqinli@amazon.com> * Signaling state machine rework (#1323) * replaced recursive calls to stepSignalingStateMachine with loops * removed recursive calls to stepSignalingStateMachine * replaced stepSignalingstatemachine with signalingStateMachineIterator * removed stepUntil, continueOnReady; removed status from iterator signature; set signalingclient version; added a lock in refreshIceConfiguration * changed the declaration for i from int to UINT32 * added signaling version; removed unnecessary comment * removed redeclaration; changed value in an existing macro * Fix issue with API call failures being treated as success (#1328) * return proper error, do not reset call result value * for non retriable failures, set the terminal exit status for state in… (#1320) * for non retriable failures, set the terminal exit status for state in state machine * address comments * adjust tests set retry max to 1 * Update LwsApiCalls.c trigger travis ci * Incorporating PIC state machine level retry changes into webrtc signaling state machine (#1326) * Incorporating PIC state machine level retry changes into webrtc signaling state machine * Signaling state machine rework (#1323) * replaced recursive calls to stepSignalingStateMachine with loops * removed recursive calls to stepSignalingStateMachine * replaced stepSignalingstatemachine with signalingStateMachineIterator * removed stepUntil, continueOnReady; removed status from iterator signature; set signalingclient version; added a lock in refreshIceConfiguration * changed the declaration for i from int to UINT32 * added signaling version; removed unnecessary comment * removed redeclaration; changed value in an existing macro * Fix issue with API call failures being treated as success (#1328) * return proper error, do not reset call result value * for non retriable failures, set the terminal exit status for state in… (#1320) * for non retriable failures, set the terminal exit status for state in state machine * address comments * adjust tests set retry max to 1 * Update LwsApiCalls.c trigger travis ci * Add retry strategy to client info to avoiud changing create signaling channel API signature * Incorporating PIC state machine level retry changes into webrtc signaling state machine * Add retry strategy to client info to avoiud changing create signaling channel API signature * Adding more debug logs in the code * fix merge conflicts * PR feedback Co-authored-by: Niyati Maheshwari <niyatim23@gmail.com> Co-authored-by: Hassan Sahibzada <hsahibza@amazon.com> * Revert " Incorporating PIC state machine level retry changes into webrtc signaling state machine (#1326)" (#1339) This reverts commit 06bffcecd7f60571e29e51eb15fa8e4549638213. * Incorporating PIC state machine level retry changes into webrtc signaling state machine (#1341) * Incorporating PIC state machine level retry changes into webrtc signaling state machine * Add a n optional check for free retry strategy * Remove unused goto label * add missing sleep in get token state machine execute API * update log line * Update Producer hash * Adding a high level retry strategy while creating signaling client * Add Retry count retrieval in hook (#1335) * Add Retry count retrieval in hook * Fix compile issue on travis * Pull in latest changes in retry structures * Rebasing off develop with successful travis run for retry * Log git hash (#1345) * Log git hash * Update CMakeLists.txt white space change to trigger travis Co-authored-by: Hassan Sahibzada <hsahibza@amazon.com> * Fix retry count to indicate count only after a retry has occured (#1348) Fix retry count to indicate count only after a retry has occurred * add support for automatic clock skew detection and correction (#1344) * add support for automatic clock skew detection and correction * auto fix clock skew and add tests * enable test to check clock recovery * remove stuff left over from debugging, reset logging default to WARN * remove unused variable * get rid of verbose logging in unit tests causes static build to fail due to excessive log output * simplify code get rid of extra call to length because the lws_hdr_copy returns the same value * handle null stream track in case of recvonly (#1346) * handle null stream track in case of recvonly * a test with null stream track for revconly * Fix a comment * whitespace change * State machine preparation is decoupled from the constructor (#1343) * Merge master into develop (#1352) * Missing the public API switch in the other samples (#1356) * Fix Fetch error retry cases (#1359) * Fix Fetch error retry cases * update comment * added implementation and a test to use remote sdp to construct local sdp (#1238) * added implementation and a test to use remote sdp to construct local sdp * used same strings in offer and test * updated tests * Update stale action workflow (#1381) * Modify issue triaging management * test on branch * Update ga for stale issue to use aws-actions instead of the one publicly available * Travis to ga (#1347) * Test github actions * Clang format * Change platform * Add macos gtest * Ubuntu latest * Address sanitizer * Add ubsan, tsan and old gcc build * Fix macos build * Allow mac and ubsan to fail * Fixing clang format * Testing allow on failure * Run github actions only on PR and merge * Test mbedtls * Rebase on develop and fix clang failure * Test if travis builds without ga * Restore travis * Test mac build and add sample check * Fix sample check and revert mac to allow fail * Travis CI to GHA migration phase 1 * Set clang for mbedtls and test msan * Split files * Comment out failing tests * Add codecov * Travis CI to GHA migration phase 1 * new Chrome v98 produces extra sdp attributes, up the limit so we do n… (#1391) * new Chrome v98 produces extra sdp attributes, up the limit so we do not reject * Fix test and change count to unit16 to avoid overflow issues * fix issue reported by codeql Co-authored-by: Divya Sampath Kumar <disa6302@colorado.edu> * GitHub actions setup (#1390) * add additional tests * fix syntax error * fix syntax error * fix syntax error * fix syntax error * fix syntax error * static build and msan without docker * fix msan * use dependencies with msan build * use gcc 9 for mac * use gcc 4.2 for mac gcc build * use gcc 4.9 for mac gcc build * check gcc version; use macos 10.15 * use clang-7 for ubsan * arm cross compilation * missed cloning the repository * use gcc * remove compiler from env * fix install deps * use clang7, macos10.15, ubuntu18.04 * fix windows build * fix test instruction * fix static build * fix static build * fix static build * fix static build * setup docker for static build * use alpine for the static build * use alpine for the static build * install dependencies * install dependencies * fix errors in static build * install dependencies * enable ipv6 * use gcc for static build * fix ubsan * fix ubsan * collate all working github actions builds * fix errors * have static,msan,windows,doxygen in travis * comment failing builds;fix ci rules * fix travis comments, os, remove exports * update log level, mac build-name * add CC * update gcc * update gcc * check cc and cxx for mac gcc * Revert "check cc and cxx for mac gcc" This reverts commit 2db1e0e4b7a9291a389cbae0f3793edd7f88c7ae. * remove travis statement * Fix swapped SSL_free() and SSL_CTX_free() (#1401) * Hangup value included in LWS retry strategy (#1403) * GitHub actions setup static build (#1405) * fix static build * remove static build from travis * fix warnings in mac builds; setup iam role for sample-check * Migrate Doxygen to GitHub Actions (#1416) * add doxygen workflow to ga * install graphviz * install ttf-freefont * specify doxyfile * use enc key * use enc key * use marketplace action to deploy * use marketplace action to deploy * use marketplace action to deploy * check current folder * check current folder * check current folder * check current folder * check current folder * check current folder * check current folder * fix deployment * fix deployment * fix deployment * fix deployment * specify doxyfile path * fix syntax * fix paths in doxyfile * fix forked branch ci * add develop branch * Fix ResourceEndpoint length check (#1411) ResourceEndpoint length check mistakenly uses ChannelName max length. * update cross-compilation builds ga (#1429) * Addressing error handling concerns for an edge case (#1443) * Addressing error handling concerns for an edge case * Clang format * Removed useless status_success check, changed test to look for correct error value * sample: fix possible timerQueue deadlock when freeSampleStreamingSession (#1448) Signed-off-by: zhiqinli@amazon.com <zhiqinli@amazon.com> * metrics: allow viewer sample to get ice candidate pair stats (#1406) Signed-off-by: Alex.Li <zhiqinli@amazon.com> * account for hexidecimal numbers (#1465) * Fix default data channel ordering mode (#1476) * Invoke gst_object_unref on allocated elements (#1477) * Fix typo (#1478) * Fix typo * Add unit test * find gcc version for static build * revert gtest version update and change alpine version * fix memory leak issue and abort trap in test * fix video delay 4s (#1525) * fix mips compile error (#1532) * fix mips compile error * fix mips compile error * fix mips compile error * Fix file caching (#1575) * Fix file caching * Update test to count entries, remove unnecessary memcpy * UT uses MEMFREE * Fix deadlock getIceCandidatePairStatsCallback (#1561) * sample: fix possible timerQueue deadlock when freeSampleStreamingSession * minor change (formatting) * Fix missing SDP m-line problem (#1458) * use fake transceiver for missing m-line * use hashtable to track previously seen transceivers * fix failing tests with updates to seenTransceivers hashtable * use hashtables for unknown codec rtpmap and payloadtype * fix firstCodec value in case of only a single codec in m-line * rename variables * clang build * fix mac-gcc build * add test * add test for missingAudioTransceiver * add comments * add comments * remove unused variable to fix mac buils * Fix GHA CI build issues (#1631) * separate builds and tests * fix clang format issues * update libgtest version to 1.12.1 * fix deprecation in libgtest * update test suite call * run tests from build * remove build from tst instruction * fix san options * fix windows build * fix path in windows build * update bat file for windows * build openssl on windows * add openssl path for windows build * specify path to openssl root folder * specify path to openssl root folder * specify path to openssl root folder * upgrade cmake version * fix windows build * update checkoutv2 to v3 * fix checkout and install pthreads * remove windows build temporarily * move to v1-node16 for aws credentials * add sudo clean * add sudo to both commanda * use event triggers * Fix CI for forked branches (#1634) * use only target * use only target * remove branch name * blank space change to trigger CI * fix WSAPoll failed when set POLLPRI flag (#1636) Co-authored-by: weishao <xweimvp@gmail.com> * Update README.md (#1637) Co-authored-by: Hassan Sahibzada <hsahibza@amazon.com> * add paths for fedora (#1638) Co-authored-by: Hassan Sahibzada <hsahibza@amazon.com> * Add clarifying comment for fallthrough (#1639) * Bkneff patch 2 (#1640) * Update kvsWebRTCClientMasterGstreamerSample.c Provide an example gstreamer pipeline for Raspberry Pi hardware encoding. Tested on Raspberry Pi 3 * Clang --------- Co-authored-by: bkneff <44409173+bkneff@users.noreply.github.com> * thread cancel memory leak, recreate signaling client & lws_context whenever a significant error has occurred, verbose and debug logging for ice & turn (#1641) * recreate signaling client & lws_context whenever a significant error has occurred * clang-format * recreate signaling client & lws_context whenever a significant error has occurred * Clang * adding local and remote null checks * More verbose and debug logging for ice & turn * Thread cancel on the media sender thread leads to memory leaks from writeFrame() not freeing all its heap usage * Clang again --------- Co-authored-by: James Delaplane <delaplan@amazon.com> * wrong port/address on debug log (#1642) Co-authored-by: Alex Zhukov <azhukov@roblox.com> * Update openssl version (#1643) * Update openssl version and fix unused param typo * Pull in producer C openssl update * fix(project): fix issue--1614 (#1644) Co-authored-by: niedb <niedb@reolink.com.cn> * update versions for actions (#1647) * Seggregaated Audio and Video frame handling, updated Master sample to handle audio and video both (#1646) Co-authored-by: Vikram(VS) <vssht@amazon.com> * Mark Datachannel specific code explicitly (#1666) Co-authored-by: Dmitry Ilyin <dima@doty.ru> * Fix turn allocation taken long time when credential is incorrect (#1667) * fix turn allocation use long time sometimes * update some code style * fix compile error * Update IceAgent.c * fix clang format * fix prflx update interrupted connectivity check * fix clang format --------- Co-authored-by: Gordon <vc60er@163.com> * Update RtcpPacket.h (#1680) * Update RtcpPacket.h * Clang format * Changed sample frames to have 1 second GOP size, and removed overly verbose log (#1686) * Jitter buffer overflows (#1677) * Modified jitterbuffer to include checks for timestamp overflow * All tests passing, some new tests still need to be added * More tests and accompanying fixes * Resolve coverity finding of multiplication causing type overflow * Change function order * Clang format * Mac compile errors fixed * Commenting out long-running test, adding timestamp overflow test * Fix port printf in log (#1682) * Fix port printf in log * Fix the clang-format Fix the clang-format use ./scripts/clang-format.sh -d src/ * fix turn permission delay 2s (#1675) * fix turn permission delay 2s * Fix the clang-format Fix the clang-format use ./scripts/clang-format.sh -d src/ * Instruction to build on MacOS M1 (#1689) * Fix build dependencies off and add version requirements in readme (#1691) * Unlock mutex in case of error (#1696) * Unlock in case of error * fix typos (#1697) Co-authored-by: Ben Mesander <bmesander@cardinalpeak.com> * IoT CertificateId as Stream Name. (#1721) * IoT CertificateId as Stream Name. * Fix the clang-format use ./scripts/clang-format.sh -d src/ --------- Co-authored-by: Lina Chen <chenln1124@thundersoft.com> * If local ICE is invalid, return from sending packet. (#1718) * If local ICE is invalid, return from sending packet. * Fix the clang-format use ./scripts/clang-format.sh -d src/ --------- Co-authored-by: Lina Chen <chenln1124@thundersoft.com> * Adds RTSP Source to GStreamer Sample (#1740) * Adds rtsp source support, modifies source-type determination * All use cases tested and debugged. * Clang formatting. * Clang formatting. * Updates credentials configuration to fix sample-check error. * Sample-check fix attempt #2 * Sample-check fix attempt 3 * Sample-check fix attempt 4 * Sample-check fix attempt * "" * " " * " " * " " * Update README.md * Updates sample run instructions structure, adds RTSP source instructions * Update README.md * Renames sample file to be same as executable, updates CMakeLists to reflect this. * Update README.md Co-authored-by: Niyati Maheshwari <niyatim23@gmail.com> * Update README.md * Updates usage statement to new sample executable name --------- Co-authored-by: Niyati Maheshwari <niyatim23@gmail.com> * replace stun with sctp (#1743) * Modify the PR template (#1745) * modify the PR template * Use bullets * Update raspberry pi hardware encode to current gstreamer (#1746) * Update raspberry pi hardware encode to current gstreamer * - Provide build instructions for 32-bit raspbian on 64-bit hardware --------- Co-authored-by: Ben Mesander <bmesander> * Set a default user agent if not provided (#1739) * Connection timeout sleep (#1744) * Remove thread_detach and looping sleep, add thread_join * Added support for socketpair() and added it to connectionlistener * Clang formatting * Fix test that previously expected TID to be invalid * remove unused variables * Fixing incorrect typing on comparison * clang formatting * strlen -> STRLEN macro * Off by 1 error in poll rfds * clang formatting * Fix comment typo regarding default source in Gst sample (#1750) * Parse IP address if the hostname conforms to Public ipv4 DNS format (#1759) * Parse IP address if the hostname conforms to Public ipv4 DNS format * Unit test for ipIpAddr function * Include and use threadpool for signaling channel messages (#1761) * Include and use threadpool for signaling channel messages * Fix clang and linux gcc compile errors * Fix pointer cast * Using SignalingClientInfo to pass information about Threadpool * edit README.md * Not necessary to change struct version * Update struct version again, add fall-through * clang formatting * Clang formatting, again * Fix the Windows build in the CI (#1764) * modify libwebsockets to work on Windows * set LWS_WITH_STATIC 1 * resume windows ci * add rest of the options * fix syntax in ci.yml * remove other options * set cmd vard * missing space in bat * add missing = in build_windows.bat * introduce cmake arguments * find_package openssl for non-windows builds * static + shared for rest of the builds * set static + shared true for shared builds always * add back ssl and crypto paths * rename vars in libwebsockets' cmake, rearrange, pthread fix * static=1 always * remove ssl and crypto paths * with_threadpool=1 * correction * correction 2 * correction 3 * correction 4 * correction 5 static * install gstreamer on windows * test mbedtls on windows * use if(WIN32) with set vars * 1671 * remove openssl arg from mbedtls build * fix mbedtls windows later * Introducing profiling of code sections and APIs (#1755) * Adds RTSP Source to GStreamer Sample (#1740) * Adds rtsp source support, modifies source-type determination * All use cases tested and debugged. * Clang formatting. * Clang formatting. * Updates credentials configuration to fix sample-check error. * Sample-check fix attempt #2 * Sample-check fix attempt 3 * Sample-check fix attempt 4 * Sample-check fix attempt * "" * " " * " " * " " * Update README.md * Updates sample run instructions structure, adds RTSP source instructions * Update README.md * Renames sample file to be same as executable, updates CMakeLists to reflect this. * Update README.md Co-authored-by: Niyati Maheshwari <niyatim23@gmail.com> * Update README.md * Updates usage statement to new sample executable name --------- Co-authored-by: Niyati Maheshwari <niyatim23@gmail.com> * Connection timeout sleep (#1744) * Remove thread_detach and looping sleep, add thread_join * Added support for socketpair() and added it to connectionlistener * Clang formatting * Fix test that previously expected TID to be invalid * remove unused variables * Fixing incorrect typing on comparison * clang formatting * strlen -> STRLEN macro * Off by 1 error in poll rfds * clang formatting * Fix comment typo regarding default source in Gst sample (#1750) * Initial commit * New structures to track signaling latency in diagnostics * Make peer connection stats accessible in application * Fix ice agent profling to store in variables, new APIs for getting ice agent metrics * Profile create peer connection * Macro fixes * More macro fix --------- Co-authored-by: Stefan Kieszkowski <85728496+stefankiesz@users.noreply.github.com> Co-authored-by: Niyati Maheshwari <niyatim23@gmail.com> Co-authored-by: jdelapla <delaplan@amazon.com> * Fix Windows tests (#1769) * enable verbose logs * fix syntax * without gtest filter * env path * cmd.exe /c * give permissions to file * move to C: instead of D: * don't move anything * add paths to pthread, ssl, crypto, websockets dlls * cd missing * uncomment other builds * comment msan * filter out tests * Refactor issue templates (#1770) * add support for CN region (#1612) (#1777) Signed-off-by: Alex Li <zhiqinli@amazon.com> Co-authored-by: Alex.D.Scofield <zhiqinli@amazon.com> * sample: remove unused pIotCoreThingName (#1720) Signed-off-by: Alex.Li <zhiqinli@amazon.com> * Fix refresh permission test by checking more regularly (#1779) * PR description GHA (#1781) * Run unit tests which require creds (#1780) * Run unit tests which require creds * TSAN supp to get past this and check if other tests pass * Reenable tsan failure * Isolate tsan * Enable all tests * Add locks around connectionClosed modification * Update SignalingApiFunctionalityTest.cpp * Have a different signaling send timeout for windows and non-windows platform * Change timer for timeout test to be unrealistic to actually force a timeout * Enable tests with codecov * Update SignalingApiFunctionalityTest.cpp fix broken test. future commit will include code change so arn doesn't take the place of the channel name so the channel end point cache numbers will also be low * Update SignalingApiTest.cpp if using temp creds need to use the temp creds file format --------- Co-authored-by: Hassan Sahibzada <hsahibza@amazon.com> Co-authored-by: James Delaplane <delaplan@amazon.com> * Release branch update and readme update (#1785) * DTLS socket no longer pre-preemptively closed (#1792) * Fix issue with aggressive nomination viewers causing master to potentially close the socket negotiating DTLS connection. Added two tests to confirm this behavior can no longer occur for aggressive nomination or standard ICE/nomination. Changed the ICE statemachine Ready and Connected setups. Connected will only set DataSending pair in an aggressive nomination case, and Ready will no longer change the DataSending pair if it has already been assigned (because if it has, DTLS handshaked could be actively happening on that socket). This means that in the current ICE state machine design DTLS negotiation will only occur after nomination, where before it would start earlier and the client would assume which pair the viewer would nominate. * clang formatting * Reset test values in each run * update transactionId for SrflxCandidateRequest (#1684) * update transactionId for SrflxCandidateRequest * Fix the clang-format * Fix wrong log headers * Change usrsctp initialization function to not open raw sockets (#1796) * Create a CMake flag to enable KVS Threadpool (#1806) * create a cmake flag to enable kvs threadpool and pass it to the SDK * create a cmake flag to enable kvs threadpool and pass it to the SDK * missed one spot * add debug logs to fix tests * fix tests attempt 1 - initialize min and max for the threadpool * silly syntax error * setting min value for threadpool in test fixture * fix clang format * fixing client info initializations in other tests * More initializations for tests * Add sleep at end of tests to avoid false flags of memory leaks as threads end asynchronously * add tsan supp * tsan sup -2 * missing # in details in supp * more sleeps to allow threadpool to close out all threads * add suppressions to threadpool * add suppressions to threadpool push * race:pthread_mutex_unlock * add test name instead of threadpool function names * rename the cmake var to control only signaling threadpool * try without . in the test name * use mutex instead of race * remove mutex:lock * add back mutex:lock * deadlock:iceServerConfigRefreshConnectedAuthExpiration * deadlock:createSignalingSync * Update producer dependency to include modified threadpool teardown * Remove previous suppressions * cleanup + rename * update git tag --------- Co-authored-by: James Delaplane <delaplan@amazon.com> * Threadpool context for WebRTC (#1810) * Threadpool context for WebRTC * Disable for windows * Include directory to shared library for windows * Remove context object, use envs to allow configuring threadpool * Include README changes * Get back threadpool context This reverts commit 23070567312595da555d1688cf21c335105543f7. * Move thread sleep to unit tests * Revert sleep from test to main file * Remove threadpool usage from signaling * Rebased off develop * Add locks around threadpool calls * Add a=ice-options:trickle to session level of SDP as viewer (#1813) * Add a=ice-options:trickle to session level of SDP as viewer * negative test case added * clang format * add chk_log_err to confirm what is null in the stack * WebRTC Client singleton and early STUN DNS resolution (#1812) * STUN DNS resolution and webrtc client singleton * Add initializer flag for the main context * Move lock out of Stun context * Add semaphore for the singleton access * Lock on the sempahore before freeing to ensure clean shutdown * Cleanup sem acquired bool flag * Use atomic refcounter * Clang format issues * Have initialized check in thread * Move context initialize setting to top of cleanup * Remove '$' from ReadMe command * Fix mbedtls build failure for 22.04 (#1823) * Fix mbedtls build failure for 22.04 * Fix CI gcc 11 mbedtls * Dont install gcc4.4 * Use the c flags in mbedtls object * Move string op error elsewhere * Fixed an issue where sctpSessionWriteMessage referenced an uninitialized value (#1814) * Allow using channel names different than the thing name (#1819) * Allow using channel names different than the thing name * Reverted the changes related to channel name in the README * Defaulting channel name to iot thing name * IAM best practices added for IoT --------- Co-authored-by: Ozan Cihangir <ozanci@amazon.lu> * Dtls handshake process optimization (#1824) * DTLS initialization optimization * Fix mbedtls build, remove free ICE agent * Fix breaking change of overwriting sctp packet * API unit tests, move acquire to before null check * Unused variable issue in UT * Change ice server count value (#1826) * CI modification (#1827) * CI modification * Fix label * Add more clarity * Handle situation where callback is invoked before hostname is populated (#1829) * Revert CI for fork (#1831) * Dtls err handling (#1832) * Improve DTLS error handling * Add check for SSL_do_handshake too * Ice turn sleepless state machine (#1825) * Starting point for turn state machine * Add timerqueue kick and checks for ice agent state machine * Completing turn connection state machine * improved error logging * Better error logging around ICE_STATE_FAILED * Adding lock around step state machine to prevent race conditions with iceAgentStatus * Only lock the iterator during stepstate * Add turn state transition after handling stun packets for turn * add null check to iceagentrestart * Use producer-c develop * Fix data race * Cleanup commented out code * remove excessive buffer check in dtls_openssl * Profile STUN DNS resolution time (#1828) * Fix regression in stun dns resolve value (#1836) * DLOGS readme update (#1838) * add deps (#1837) * Fix frame indexing in master sample to handle SRTP connection not ready yet (#1833) * Add fix to kvsWebRTCClientMaster.c * Change printf-s to DLOG-s * Add log for frame drop due to srtp not ready yet * Add missing sample prefix to log lines * Semicolon * CLANG * Remove \n from logs * " " * CLANG * Move lock out of checkStateMachine and instead have it present in from* functions (#1839) * Update SessionDescription.c (#1842) * Update SessionDescription.c Adds trickle ice option to application m-line (data channel). * Update SessionDescription.c respect the boolean value for trickle ice so it's consistent across all media level and session level * clang format * M1 build (#1849) * m1 build * try m clang instead of gcc * remove ldflags and cpath * add back * unlink openssl in m1 * -Wno-nullability-extension * -Wno-nullability-extension in compile options * -Wno-nullability-extension in compile options * try cmake twice * add wno to libsrtp in cmake_c_flags * llvm * llvm@15 * llvm@15 removed tests * run cmake only once on m1 * run cmake twice with tests * check the contents of build * don't run the tests * remove wno * gcc * Update Readme to include Windows build instructions (#1858) * update windows readme * update windows readme * typo * Sample: Ignore empty session token (#1857) * Allow empty session token to be set without interfering * Use getenv macro * Set session token to empty string in test * missing null check (#1874) * Asynchronous get ice config (#1854) * Asynchronous get ice config * Fixing mac compile error, addressing comments, correcting spelling error * clang format * fixing test util functions to include new APIs * Unused variables for certain compile time flags breaking mac compile * fixing more compile errors for mac * Fix a dead lock, and fix a test with the API changes * iceAgentRestart does not remove the IceServers since the old design required them to be supplied at object creation. Initialize relay candidates at end of iceAgentRestart. * Update PIC build in an attempt to fix static build on Mac * Moving git tag back to develop, since develop has been updated * remove geticeconfig from standard connect state machine flow * Async test, and moving geticeserverconfig out of the standard signaling state machine flow * clang format * Incorrect state transition * fixing async test * Up the sleep time * change async func for test to handle answer and offer * change location of creating pointer pointer * Fixing tests * Fix gathering to allow reporting relay candidates even after all srflx candidates have been recieved * unit test, longer sleep on teardown of threadpool * Fixing tests * Update samples based off feedback, fix clang compile error in test * Moved iceUriCount increment, added comments to public API * fix mac compile error from unused variable for specific ifdef * Merge release into develop (#1865) * No more detaching threads in tests (#1889) * No more detaching threads in tests * Missed joining in one test * lock around adding thread to vector * terminate adding threads flag * reset bool in tests * Change on Ice handler after done with test to stop accessing out of scope variables after scope is closed * unused params * Time-to-first-frame metrics benchmarking using datachannel (#1846) * data channel benchmarking message * fix calculation * send peerconnection, iceagent, signaling metrics to viewer via dc * signaling breakdown * data channel benchmarking message * fix calculation * send peerconnection, iceagent, signaling metrics to viewer via dc * signaling breakdown * cmake flag, ifdef * move signaling and offer / answer metrics out of signaling stats * remove callTime for start and end times in signaling * remove new lines * clang format * fix clang format * fix macos-gcc-ci * put cleanup in ifdef * add cmake flag * additional builds with cmake flags for mac and ubuntu, max string size for dc, no strlen calc in max string sizes * fix clang-format * mac-os-dc-metrics-build-gcc * increase signaling metrics message size * address comments: bool, add back calltimes, remove hns * missed an hns * dlogp * fix the build * remove extra space from ci * cleanup-1 * clang-format * fix git_tag from master to fix the ci * Revert "fix git_tag from master to fix the ci" This reverts commit 870deb3ddaf7c3676bebd267b0d61a76ad562751. * move message defs to common * remove unused var * remove unused var * cleanup-3 * cleanup-4 * fix macos build * Revert "fix macos build" This reverts commit 041c858ce47adb1a812b24da86d7ac91b824fd8c. * use double quotes instead of single for char array * forgot to rename in the string * fix initialization + readme * remove offerTime and use offerReceivedTime instead * move globals to streamingsession * rename + memset * fix clang format * add null check for streaming session * null check for streaming session and psampleconfigurtion * add error messages * clang * error message * ubuntu sample check update * fix sample check * Update lws version (#1820) * Update lws version * Remove patch * Use old gcc patch * Old gcc patch update * Fix windows patching failure * Add verbose logging for patch failure * Remove newline in the patch file * Trying a windows friendly patch file * Move to another patch file * Revert "Move to another patch file" This reverts commit d94a3da44226e10164f03d99a26e7eb699459055. * Revert "Trying a windows friendly patch file" This reverts commit a6c7de25bfbf756301b17db888ede803fbfd0a8a. * Revert "Remove newline in the patch file" This reverts commit 9e5d47e463271626684b0e0a335d0e2bc00d6e0c. * Windows patch fix * Update to 4.3.3 * Reintro gcc patch for lws_map * Rebase develop * DTLS API test * Revert "DTLS API test" This reverts commit 83f104b2bc53305d35fc7ca3e8bfa9a08ebcc924. * WINDOW_UPDATE failure on mbedtls, enable an option * Revert to 4.3.2 to check if mbedtls passes there * Disable alpn * codingspirit PR #1869 (#1872) * fix compiling issue caused by "stringop-overflow" in old gcc * Add quotes around version number * Add mbedtls-ubuntu-gcc-4_4-build to CI * Separate flag setting * Add else clause for detected compiler Co-authored-by: zhiqinli * Create state machines with names (#1894) * Create state machines with names * Add turn object in logs * Add links and enhance formatting (#1895) * Add links and enhance formatting * Update README.md Co-authored-by: Stefan Kieszkowski <85728496+stefankiesz@users.noreply.github.com> --------- Co-authored-by: Stefan Kieszkowski <85728496+stefankiesz@users.noreply.github.com> * Turn improvements and profiling (#1896) * Use timeout value instead of counter for allocation * Add timeout for get credentials too and change all timeouts to a standard 5 seconds * Added internal profiling and SM labels * Add IPv4 check while adding peer * Nit * debug string cleanup * Profile create perm and bind channel only first time and profile per peer * Add README * Fix compiler ubused variable warnings * Fix the problem that the session is not released when handleOffer processing fails (#1668) * Update Common.c Fix the problem that the session is not released when handleOffer processing fails * fix clang format * add cleanup * missed the & * remove pSampleStreamingSession->offerReceiveTime = GETTIME(); * move the bool --------- Co-authored-by: Kelephant <keviniot@163.com> * Update issue template (#1898) * Request more information on the issue template * Update yaml indenting * Update bug_report.yml * Update bug_report.yml * Update bug_report.yml * Update bug_report.yml * Update bug_report.yml * Add information on sanitizers in CI * Adjust linebreaks * Fix packetsDiscarded tracking operation (#1903) * CMAKE_BUILD_TYPE=Release build (#1897) * Release build * Enable build type setting on all dependencies and update README * Remove SPRINTF usage throughout... * Fix disable data channel unit test build failure and reduce SDP character array lengths wherever relevant following spec * Set count to 7 since the structure member sizes are set to count + 1 * remove debug * Add snprintf checks * Set file size to 10 kb and increase log rotation to avoid high memalloc * Remove unused threadpool in signaling (#1907) * New release cut * testing release with media storage support (#1783) * Log ice candidate protocol appropriately (#1230) * Log ice candidate protocol appropriately * Add develop to travis CI * Address comments * Realign branches during transition (#1257) * create data channel sample (#1203) * create data channel sample * moved variables to Samples.h, encapsulated with ENABLE_DATA_CHANNEL directive * removed unused variables, moved variable declarations to the top of a block * create data channel sample * moved variables to Samples.h, encapsulated with ENABLE_DATA_CHANNEL directive * Cancel the thread once mediaThreadStarted flag is set to false (#1227) * Initial stale PR template (#1226) * Update stale issue template * Testing every minute * Fix stale issue PR template (#1234) No code changed. Just a template change. So merging * Add bug and question label * Switch stale PR action to daily cadence * [FIX] When protocol in DCEP header of data channel open command is not empty, there is a check preventing the data channel to be opened. Now protocol length is correctly handled to avoid check failing. (#1228) Co-authored-by: Niyati Maheshwari <niyatim23@gmail.com> Co-authored-by: Divya Sampath Kumar <disa6302@colorado.edu> Co-authored-by: ela34 <8700736+ela34@users.noreply.github.com> * set protocol value following the spec (#1259) Co-authored-by: liyufang <liyufang@xiaomi.com> * filter out invalid candidate in sdp (#1260) Co-authored-by: liyufang <liyufang@xiaomi.com> * Added targets for cmake clean (#1253) * added targets for cmake clean * added new line, updated readme * added missing new line * updated readme to include folder details * updated readme to include folder details * viewer sample: wrap datachannel callback with `ENABLE_DATA_CHANNEL` (#1261) * create data channel sample (#1203) * create data channel sample * moved variables to Samples.h, encapsulated with ENABLE_DATA_CHANNEL directive * removed unused variables, moved variable declarations to the top of a block * create data channel sample * moved variables to Samples.h, encapsulated with ENABLE_DATA_CHANNEL directive * Cancel the thread once mediaThreadStarted flag is set to false (#1227) * Initial stale PR template (#1226) * Update stale issue template * Testing every minute * Fix stale issue PR template (#1234) No code changed. Just a template change. So merging * Add bug and question label * Switch stale PR action to daily cadence * [FIX] When protocol in DCEP header of data channel open command is not empty, there is a check preventing the data channel to be opened. Now protocol length is correctly handled to avoid check failing. (#1228) * viewer sample: wrap datachannel callback with `ENABLE_DATA_CHANNEL` Signed-off-by: zhiqinli@amazon.com <zhiqinli@amazon.com> Co-authored-by: Niyati Maheshwari <niyatim23@gmail.com> Co-authored-by: Divya Sampath Kumar <disa6302@colorado.edu> Co-authored-by: ela34 <8700736+ela34@users.noreply.github.com> * libwebsockets: add patch to fix pipe fd leak issue (#1264) Signed-off-by: Alex.Li <zhiqinli@amazon.com> * Fix scripts/pare_status.py for non-status #defines (#1268) (#1274) Co-authored-by: Kevin Allen <kallen@aurora.tech> * fix a few bugs * Revert "fix a few bugs" This reverts commit 093902432fb24f42ade2857c23eca950e0b41a2f. * fix some bugs (#1277) * Fix bugs (#1279) * fix edge case try to unlock a mutex which is not locked in teh acse the sample config was NULL (#1286) * cmake: allow user to specify OPEN_SRC_INSTALL_PREFIX (#1293) Signed-off-by: Alex.Li <zhiqinli@amazon.com> * Fix inconsistent log priority (#1309) Patch reduces priority of a few info level log messages to verbose level to be consistent with other functions in file and rest of code base. * Modify protocol loggin design in develop (#1311) * typo: typo fix (#1317) Signed-off-by: Alex.Li <zhiqinli@amazon.com> * Signaling state machine rework (#1323) * replaced recursive calls to stepSignalingStateMachine with loops * removed recursive calls to stepSignalingStateMachine * replaced stepSignalingstatemachine with signalingStateMachineIterator * removed stepUntil, continueOnReady; removed status from iterator signature; set signalingclient version; added a lock in refreshIceConfiguration * changed the declaration for i from int to UINT32 * added signaling version; removed unnecessary comment * removed redeclaration; changed value in an existing macro * Fix issue with API call failures being treated as success (#1328) * return proper error, do not reset call result value * for non retriable failures, set the terminal exit status for state in… (#1320) * for non retriable failures, set the terminal exit status for state in state machine * address comments * adjust tests set retry max to 1 * Update LwsApiCalls.c trigger travis ci * Incorporating PIC state machine level retry changes into webrtc signaling state machine (#1326) * Incorporating PIC state machine level retry changes into webrtc signaling state machine * Signaling state machine rework (#1323) * replaced recursive calls to stepSignalingStateMachine with loops * removed recursive calls to stepSignalingStateMachine * replaced stepSignalingstatemachine with signalingStateMachineIterator * removed stepUntil, continueOnReady; removed status from iterator signature; set signalingclient version; added a lock in refreshIceConfiguration * changed the declaration for i from int to UINT32 * added signaling version; removed unnecessary comment * removed redeclaration; changed value in an existing macro * Fix issue with API call failures being treated as success (#1328) * return proper error, do not reset call result value * for non retriable failures, set the terminal exit status for state in… (#1320) * for non retriable failures, set the terminal exit status for state in state machine * address comments * adjust tests set retry max to 1 * Update LwsApiCalls.c trigger travis ci * Add retry strategy to client info to avoiud changing create signaling channel API signature * Incorporating PIC state machine level retry changes into webrtc signaling state machine * Add retry strategy to client info to avoiud changing create signaling channel API signature * Adding more debug logs in the code * fix merge conflicts * PR feedback Co-authored-by: Niyati Maheshwari <niyatim23@gmail.com> Co-authored-by: Hassan Sahibzada <hsahibza@amazon.com> * Revert " Incorporating PIC state machine level retry changes into webrtc signaling state machine (#1326)" (#1339) This reverts commit 06bffcecd7f60571e29e51eb15fa8e4549638213. * Incorporating PIC state machine level retry changes into webrtc signaling state machine (#1341) * Incorporating PIC state machine level retry changes into webrtc signaling state machine * Add a n optional check for free retry strategy * Remove unused goto label * add missing sleep in get token state machine execute API * update log line * Update Producer hash * Adding a high level retry strategy while creating signaling client * Add Retry count retrieval in hook (#1335) * Add Retry count retrieval in hook * Fix compile issue on travis * Pull in latest changes in retry structures * Rebasing off develop with successful travis run for retry * Log git hash (#1345) * Log git hash * Update CMakeLists.txt white space change to trigger travis Co-authored-by: Hassan Sahibzada <hsahibza@amazon.com> * Fix retry count to indicate count only after a retry has occured (#1348) Fix retry count to indicate count only after a retry has occurred * add support for automatic clock skew detection and correction (#1344) * add support for automatic clock skew detection and correction * auto fix clock skew and add tests * enable test to check clock recovery * remove stuff left over from debugging, reset logging default to WARN * remove unused variable * get rid of verbose logging in unit tests causes static build to fail due to excessive log output * simplify code get rid of extra call to length because the lws_hdr_copy returns the same value * handle null stream track in case of recvonly (#1346) * handle null stream track in case of recvonly * a test with null stream track for revconly * Fix a comment * whitespace change * State machine preparation is decoupled from the constructor (#1343) * Merge master into develop (#1352) * Missing the public API switch in the other samples (#1356) * Fix Fetch error retry cases (#1359) * Fix Fetch error retry cases * update comment * added implementation and a test to use remote sdp to construct local sdp (#1238) * added implementation and a test to use remote sdp to construct local sdp * used same strings in offer and test * updated tests * Update stale action workflow (#1381) * Modify issue triaging management * test on branch * Update ga for stale issue to use aws-actions instead of the one publicly available * Travis to ga (#1347) * Test github actions * Clang format * Change platform * Add macos gtest * Ubuntu latest * Address sanitizer * Add ubsan, tsan and old gcc build * Fix macos build * Allow mac and ubsan to fail * Fixing clang format * Testing allow on failure * Run github actions only on PR and merge * Test mbedtls * Rebase on develop and fix clang failure * Test if travis builds without ga * Restore travis * Test mac build and add sample check * Fix sample check and revert mac to allow fail * Travis CI to GHA migration phase 1 * Set clang for mbedtls and test msan * Split files * Comment out failing tests * Add codecov * Travis CI to GHA migration phase 1 * new Chrome v98 produces extra sdp attributes, up the limit so we do n… (#1391) * new Chrome v98 produces extra sdp attributes, up the limit so we do not reject * Fix test and change count to unit16 to avoid overflow issues * fix issue reported by codeql Co-authored-by: Divya Sampath Kumar <disa6302@colorado.edu> * GitHub actions setup (#1390) * add additional tests * fix syntax error * fix syntax error * fix syntax error * fix syntax error * fix syntax error * static build and msan without docker * fix msan * use dependencies with msan build * use gcc 9 for mac * use gcc 4.2 for mac gcc build * use gcc 4.9 for mac gcc build * check gcc version; use macos 10.15 * use clang-7 for ubsan * arm cross compilation * missed cloning the repository * use gcc * remove compiler from env * fix install deps * use clang7, macos10.15, ubuntu18.04 * fix windows build * fix test instruction * fix static build * fix static build * fix static build * fix static build * setup docker for static build * use alpine for the static build * use alpine for the static build * install dependencies * install dependencies * fix errors in static build * install dependencies * enable ipv6 * use gcc for static build * fix ubsan * fix ubsan * collate all working github actions builds * fix errors * have static,msan,windows,doxygen in travis * comment failing builds;fix ci rules * fix travis comments, os, remove exports * update log level, mac build-name * add CC * update gcc * update gcc * check cc and cxx for mac gcc * Revert "check cc and cxx for mac gcc" This reverts commit 2db1e0e4b7a9291a389cbae0f3793edd7f88c7ae. * remove travis statement * Fix swapped SSL_free() and SSL_CTX_free() (#1401) * Hangup value included in LWS retry strategy (#1403) * GitHub actions setup static build (#1405) * fix static build * remove static build from travis * fix warnings in mac builds; setup iam role for sample-check * Migrate Doxygen to GitHub Actions (#1416) * add doxygen workflow to ga * install graphviz * install ttf-freefont * specify doxyfile * use enc key * use enc key * use marketplace action to deploy * use marketplace action to deploy * use marketplace action to deploy * check current folder * check current folder * check current folder * check current folder * check current folder * check current folder * check current folder * fix deployment * fix deployment * fix deployment * fix deployment * specify doxyfile path * fix syntax * fix paths in doxyfile * fix forked branch ci * add develop branch * Fix ResourceEndpoint length check (#1411) ResourceEndpoint length check mistakenly uses ChannelName max length. * update cross-compilation builds ga (#1429) * Addressing error handling concerns for an edge case (#1443) * Addressing error handling concerns for an edge case * Clang format * Removed useless status_success check, changed test to look for correct error value * sample: fix possible timerQueue deadlock when freeSampleStreamingSession (#1448) Signed-off-by: zhiqinli@amazon.com <zhiqinli@amazon.com> * metrics: allow viewer sample to get ice candidate pair stats (#1406) Signed-off-by: Alex.Li <zhiqinli@amazon.com> * account for hexidecimal numbers (#1465) * Fix default data channel ordering mode (#1476) * Invoke gst_object_unref on allocated elements (#1477) * Fix typo (#1478) * Fix typo * Add unit test * find gcc version for static build * revert gtest version update and change alpine version * fix memory leak issue and abort trap in test * fix video delay 4s (#1525) * fix mips compile error (#1532) * fix mips compile error * fix mips compile error * fix mips compile error * Fix file caching (#1575) * Fix file caching * Update test to count entries, remove unnecessary memcpy * UT uses MEMFREE * Fix deadlock getIceCandidatePairStatsCallback (#1561) * sample: fix possible timerQueue deadlock when freeSampleStreamingSession * minor change (formatting) * wrtc stream ingestion support * clean up * default to disable data channel for wrtc ingestion * Fix missing SDP m-line problem (#1458) * use fake transceiver for missing m-line * use hashtable to track previously seen transceivers * fix failing tests with updates to seenTransceivers hashtable * use hashtables for unknown codec rtpmap and payloadtype * fix firstCodec value in case of only a single codec in m-line * rename variables * clang build * fix mac-gcc build * add test * add test for missingAudioTransceiver * add comments * add comments * remove unused variable to fix mac buils * wrtc stream ingestion support (#1605) * update readme (#1608) * update readme * update description * remove gst based storage sample (#1619) * Fix GHA CI build issues (#1631) * separate builds and tests * fix clang format issues * update libgtest version to 1.12.1 * fix deprecation in libgtest * update test suite call * run tests from build * remove build from tst instruction * fix san options * fix windows build * fix path in windows build * update bat file for windows * build openssl on windows * add openssl path for windows build * specify path to openssl root folder * specify path to openssl root folder * specify path to openssl root folder * upgrade cmake version * fix windows build * update checkoutv2 to v3 * fix checkout and install pthreads * remove windows build temporarily * move to v1-node16 for aws credentials * add sudo clean * add sudo to both commanda * use event triggers * Fix ice candidate issue with GStreamer sample (#1629) * fix gst sample * add branch to ci * fix clang * fix os versions in ci * remove unused vars to fix mac-clang build * remove unused vars to fix mac-gcc build * separate builds and tests * separate builds and tests * change test instruction for ci * change test instruction for ci * fix failing builds * add branch * Fix CI for forked branches (#1634) * use only target * use only target * remove branch name * blank space change to trigger CI * fix WSAPoll failed when set POLLPRI flag (#1636) Co-authored-by: weishao <xweimvp@gmail.com> * Update README.md (#1637) Co-authored-by: Hassan Sahibzada <hsahibza@amazon.com> * add paths for fedora (#1638) Co-authored-by: Hassan Sahibzada <hsahibza@amazon.com> * Add clarifying comment for fallthrough (#1639) * Bkneff patch 2 (#1640) * Update kvsWebRTCClientMasterGstreamerSample.c Provide an example gstreamer pipeline for Raspberry Pi hardware encoding. Tested on Raspberry Pi 3 * Clang --------- Co-authored-by: bkneff <44409173+bkneff@users.noreply.github.com> * thread cancel memory leak, recreate signaling client & lws_context whenever a significant error has occurred, verbose and debug logging for ice & turn (#1641) * recreate signaling client & lws_context whenever a significant error has occurred * clang-format * recreate signaling client & lws_context whenever a significant error has occurred * Clang * adding local and remote null checks * More verbose and debug logging for ice & turn * Thread cancel on the media sender thread leads to memory leaks from writeFrame() not freeing all its heap usage * Clang again --------- Co-authored-by: James Delaplane <delaplan@amazon.com> * wrong port/address on debug log (#1642) Co-authored-by: Alex Zhukov <azhukov@roblox.com> * Update openssl version (#1643) * Update openssl version and fix unused param typo * Pull in producer C openssl update * fix(project): fix issue--1614 (#1644) Co-authored-by: niedb <niedb@reolink.com.cn> * update versions for actions (#1647) * Seggregaated Audio and Video frame handling, updated Master sample to handle audio and video both (#1646) Co-authored-by: Vikram(VS) <vssht@amazon.com> * Mark Datachannel specific code explicitly (#1666) Co-authored-by: Dmitry Ilyin <dima@doty.ru> * Fix turn allocation taken long time when credential is incorrect (#1667) * fix turn allocation use long time sometimes * update some code style * fix compile error * Update IceAgent.c * fix clang format * fix prflx update interrupted connectivity check * fix clang format --------- Co-authored-by: Gordon <vc60er@163.com> * Update RtcpPacket.h (#1680) * Update RtcpPacket.h * Clang format * Changed sample frames to have 1 second GOP size, and removed overly verbose log (#1686) * Jitter buffer overflows (#1677) * Modified jitterbuffer to include checks for timestamp overflow * All tests passing, some new tests still need to be added * More tests and accompanying fixes * Resolve coverity finding of multiplication causing type overflow * Change function order * Clang format * Mac compile errors fixed * Commenting out long-running test, adding timestamp overflow test * Fix port printf in log (#1682) * Fix port printf in log * Fix the clang-format Fix the clang-format use ./scripts/clang-format.sh -d src/ * fix turn permission delay 2s (#1675) * fix turn permission delay 2s * Fix the clang-format Fix the clang-format use ./scripts/clang-format.sh -d src/ * Instruction to build on MacOS M1 (#1689) * Fix build dependencies off and add version requirements in readme (#1691) * Unlock mutex in case of error (#1696) * Unlock in case of error * fix typos (#1697) Co-authored-by: Ben Mesander <bmesander@cardinalpeak.com> * IoT CertificateId as Stream Name. (#1721) * IoT CertificateId as Stream Name. * Fix the clang-format use ./scripts/clang-format.sh -d src/ --------- Co-authored-by: Lina Chen <chenln1124@thundersoft.com> * If local ICE is invalid, return from sending packet. (#1718) * If local ICE is invalid, return from sending packet. * Fix the clang-format use ./scripts/clang-format.sh -d src/ --------- Co-authored-by: Lina Chen <chenln1124@thundersoft.com> * Adds RTSP Source to GStreamer Sample (#1740) * Adds rtsp source support, modifies source-type determination * All use cases tested and debugged. * Clang formatting. * Clang formatting. * Updates credentials configuration to fix sample-check error. * Sample-check fix attempt #2 * Sample-check fix attempt 3 * Sample-check fix attempt 4 * Sample-check fix attempt * "" * " " * " " * " " * Update README.md * Updates sample run instructions structure, adds RTSP source instructions * Update README.md * Renames sample file to be same as executable, updates CMakeLists to reflect this. * Update README.md Co-authored-by: Niyati Maheshwari <niyatim23@gmail.com> * Update README.md * Updates usage statement to new sample executable name --------- Co-authored-by: Niyati Maheshwari <niyatim23@gmail.com> * replace stun with sctp (#1743) * Modify the PR template (#1745) * modify the PR template * Use bullets * Update raspberry pi hardware encode to current gstreamer (#1746) * Update raspberry pi hardware encode to current gstreamer * - Provide build instructions for 32-bit raspbian on 64-bit hardware --------- Co-authored-by: Ben Mesander <bmesander> * Set a default user agent if not provided (#1739) * Connection timeout sleep (#1744) * Remove thread_detach and looping sleep, add thread_join * Added support for socketpair() and added it to connectionlistener * Clang formatting * Fix test that previously expected TID to be invalid * remove unused variables * Fixing incorrect typing on comparison * clang formatting * strlen -> STRLEN macro * Off by 1 error in poll rfds * clang formatting * Do Not Send SCTP Packets when Data Channel is Disabled (#1749) * no sctp packets when data channel is disabled * fix clang format * Fix comment typo regarding default source in Gst sample (#1750) * Parse IP address if the hostname conforms to Public ipv4 DNS format (#1759) * Parse IP address if the hostname conforms to Public ipv4 DNS format * Unit test for ipIpAddr function * Include and use threadpool for signaling channel messages (#1761) * Include and use threadpool for signaling channel messages * Fix clang and linux gcc compile errors * Fix pointer cast * Using SignalingClientInfo to pass information about Threadpool * edit README.md * Not necessary to change struct version * Update struct version again, add fall-through * clang formatting * Clang formatting, again * Fix the Windows build in the CI (#1764) * modify libwebsockets to work on Windows * set LWS_WITH_STATIC 1 * resume windows ci * add rest of the options * fix syntax in ci.yml * remove other options * set cmd vard * missing space in bat * add missing = in build_windows.bat * introduce cmake arguments * find_package openssl for non-windows builds * static + shared for rest of the builds * set static + shared true for shared builds always * add back ssl and crypto paths * rename vars in libwebsockets' cmake, rearrange, pthread fix * static=1 always * remove ssl and crypto paths * with_threadpool=1 * correction * correction 2 * correction 3 * correction 4 * correction 5 static * install gstreamer on windows * test mbedtls on windows * use if(WIN32) with set vars * 1671 * remove openssl arg from mbedtls build * fix mbedtls windows later * Introducing profiling of code sections and APIs (#1755) * Adds RTSP Source to GStreamer Sample (#1740) * Adds rtsp source support, modifies source-type determination * All use cases tested and debugged. …
What was changed?
GetIceServerConfig can now be called asynchronously when threadpool is enabled, and is no longer called by the fetch() API, and has to be directly invoked through refresh or gather ice config info.
Why was it changed?
GetIceServerConfig has a long time to resolution and is not involved in finding srflx candidates, however its previous sequential and synchronous design after receiving an offer slowed down time to first frame.
How was it changed?
Added to a threadpool, ice agent was changed to allow for relay candidates to be discovered after initial object creation.
What testing was done for the changes?
Test added, multiple tests changed, and tested on CI & manually.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.